You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YAML scanner has problems with unusual mapping keys
Trans reported:
Found an issue with the YAML syntax highlighting in CodeRay. Try it on the following example.
When it hits mri <1.9 it starts reverse highlighting almost every other line.
- package: system_timerengine : mri <1.9
The problem is that the scanner doesn't allow white space before the colon. That's an easy fix; however, the set of characters allowed in keys is limited and non spec-conform.
Not sure how to approach this ticket. It seems to me that the YAML scanner needs to be rewritten. Questions:
What are the most problematic shortcomings of the current YAML scanner?
Is the Pygments one any better?
What's the best approach to scanning such an over-complicated "natural" format? Heuristics which lots of special cases or a more simple/rigid scanner that's optimized for the typical style people use?
YAML scanner has problems with unusual mapping keys
A patch for the 1.0 trunk:
From Redmine: http://odd-eyed-code.org/issues/231
YAML scanner doesn't recognize false and true
From Redmine: http://odd-eyed-code.org/issues/234
YAML scanner doesn't recognize - -
From Redmine: http://odd-eyed-code.org/issues/237
The yaml.multiline example is broken
From Redmine: http://odd-eyed-code.org/issues/238
YAML scanner doesn't recognize arrays
From Redmine: http://odd-eyed-code.org/issues/239
The text was updated successfully, but these errors were encountered: