vermut / intellij-ansible

YAML/Ansible support with Jinja2 tags / IntelliJ IDEA
https://plugins.jetbrains.com/plugin/7792
Other
205 stars 29 forks source link

reported syntax errors with multi-line pipe-style (`|`) strings #70

Open FauxFaux opened 7 years ago

FauxFaux commented 7 years ago

A document with pipe/bar/|/... style multi-line strings is reported as covered in errors, it seems. It looks like this is supposed to work, because I see it being fixed before in the changelog.

Example syntax:

foo: |
  bar

A screenshot of it being highlighted as an error: broken indentation

vermut commented 7 years ago

True, it mistakes PGP block for Yaml header. Will see if it can be fixed.

funivan commented 6 years ago

Also, yaml supports |- 08 32 14

wbkoetsier commented 6 years ago

I'm using this plugin on PyCharm to get YAML syntax highlighting, including spotting errors.

I realise that this is an old issue and that this plugin is not under active development. I'd like to report this anyway, who knows someone likes to fix.

I'm also experiencing a problem with multi line strings, either using | or >.

examples:
  - no errors here
  - 'no erreors {here} too+'
  - >
    this is not allowed by the plugin, but is
    correct YAML syntax
    even with + or { or whatever.
  - |
    this should have worked too
    according to the YAML spec
  - this is obviously
    incorrect
  - 'this is correct according
    to the plugin, I'm not sure 
    about YAML here'

YAML: 1.2 PyCharm: 2016.3 (still on 2016 due to a debugger related bug in 2017 version...) YAML/Ansible plugin: 0.9.5

gerhard4 commented 3 years ago

Same for > and >- strings. See also https://yaml-multiline.info/ for the kinds of strings YAML supports.