<table><tr><td style="">nibags edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-2nim57zid4mdpfj/">(Show Details)</a><br />nibags edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-yloh2dleyb7my6i/">(Show Details)</a><br />nibags added reviewers: cullmann, dhaumann, Framework: Syntax Highlighting.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15780">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Highlight literal blocks after the operators `|`, `|-`, `|+`, `>`, `>-` and `>+`. <br />
<br />
To do this correctly, the indentation of the Key or operator is captured (with dynamic rules). Note that in nested block collections, the `-` and `?` characters are considered as part of the indentation (ref. [2] & [3]):<br />
<br />
* With Key: Text lines with indentation of the Key plus a space are considered literal. The `-` and `?` operators are considered as part of the indentation:<br />
{F6286907}<br />
<br />
* If there is no Key present: the literal/folded operator is at the beginning of the line or there is `-` or `?` character before. In the first case, the indentation of the literal/folded operator is captured and, in the second, the indentation of `-` or `?`. In nested blocks or sequences, the indentation of the last operator `?` or `-` is captured:<br />
{F6286908}<br />
<br />
* But, this implementation has a limitation: it only supports 6 nested operadors (`?` and `-`) at most.<br />
<br />
This only works with indentations with spaces. If a tab is detected, it is highlighted with "Alert". <br />
The empty lines are also part of the literal block.<br />
<br />
Also, some minor improvements are included: the sequences require a dash plus a space.<br />
<br />
**Source**:<br />
YAML 1.2 Specs:<br />
* [1] Chapter 8: Block Styles: http://yaml.org/spec/1.2/spec.html#style/block/<br />
* [2] 6.1. Indentation Spaces: http://yaml.org/spec/1.2/spec.html#id2777534<br />
* [3] 8.2.1. Block Sequences: http://yaml.org/spec/1.2/spec.html#id2797382<br />
<br />
BUG: 398314</span></div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">The changes I verified according to:<br />
* https://hackage.haskell.org/package/YamlReference<br />
* https://github.com/haphan/yaml-validator</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15780">https://phabricator.kde.org/D15780</a></div></div><br /><div><strong>To: </strong>nibags, cullmann, dhaumann, Framework: Syntax Highlighting<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>