Closed lierdakil closed 7 years ago
Yeah, so the end patterns are not designed with any notion of embedding in mind. Looks like they are over-capturing though.
Please create a different issue for the ...
tokenization. That one will be much easier to fix.
I should probably point out that this:
attribute: value
naked string
is not valid YAML by any stretch of the imagination. naked string
is not a string, not any valid token, it's just plain invalid in this context.
So I guess the real problem is that end patterns don't terminate properly, period, not that those "were not designed with embedding in mind".
Yeah, but if you add a space it is. So the check isn't strict enough.
Turns out that I had to fix the root embedding issue to make the document end marker work. So expect to see a PR soon.
Prerequisites
Description
When embedding in other grammars (most notably Markdown), yaml leaks scope like crazy.
Example:
Also happens with Pandoc-style YAML blocks:
Naked
...
should be treated as YAML document end, but it's instead treated as string, for some reason.Steps to Reproduce
Should be obvious, try the following Markdown documents:
Expected behavior: No scope leakage
Actual behavior: Much scope leakage
Reproduces how often: 100%
Versions
I'm pretty sure this started to be an issue since Atom-1.13 or around that.
Additional Information
None