Code folding is broken for certain YAML files

Report Bugs Here

Code folding is broken for certain YAML files

Postby rovf » Tue Aug 23, 2016 12:13 pm

When I edit YAML files, the folding of lines is broken, if the elements of a YAML list are aligned right below the parent element.

Example file demo.yaml:
Code: Select all
---
key1:
    - element11
    - element12
    - element12
key2:
- element21
- element22
- element23


For this file, code folding is offered for key1, but not for key2.

The difference is that within key1, there are spaces in front of the dash, while the dash for key2 is left-aligned in column 1, i.e. right below key2.

However, according to the YAML ANSI standard, both are fine. The standard says: In YAML block styles, structure is determined by indentation. In general, indentation is defined as a zero or more space characters at the start of a line.

In fact, many Libraries (for example, the YAML libraries for Ruby or Java) generate YAML code with "zero spaces", to make the resulting string as short as possible.

Running Editra 0.7.20 on Windows 7
rovf
User
 
Posts: 8
Joined: Wed May 21, 2014 8:19 am

Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron