pearofducks/ansible-vim

Syntax highlighting breaks when multiline string has hyphens

stemid opened this issue · 3 comments

task: >
  testing variable {{ like_this }}
  testing quoted variable '{{ like_this }}' \
  variable assignment='{{ this_is_ok }}' \
  testing variable-assignment='{{ oh_this_breaks }}'
  testing newline
args:
  wut: foobar

more_objects:
  - key: syntax_check
    value: "Verifying that Syntax highlighting works"
  - key: syntax_check02
    value: 'Verifying more quotes'

It only breaks when line 5 is used, must be a combination of hyphenated string values followed by quote marks without whitespace between.

If you set the filetype to YAML, does it still break?

@pearofducks Yes, I only recently started using ansible-vim to solve the issue of this syntax breaking in some Ansible files.

So before that I used the vim standard and it still breaks. Also breaks if I try to force set ft=yaml, not sure if that was the standard.

Yeah, we largely inherit from YAML syntax for this plugin - so this isn't a bug with this plugin, but rather with YAML highlighting.

This should be fixed in Vim's YAML syntax, not here.