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 is the worst. :) What are the valid rules for multi-line strings anyways? Is there some chance we could do this better with our own parser rather than a super complex regex?
The first thing that came to my mind after seeing the regex is this. :)
I don't have enough knowledge about the library's architecture, but I think it's not possible to properly detect multiline strings using a regex, as it knows nothing about the property's indentation that contains the multiline string.
@joshgoebel In the regex I mentioned \n is replaced by \n+ and \n? is replaced by \n*. But I can't give you any guarantees that it's better than the currently used one.
Describe the issue
YAML multiline strings break on first empty line even when the rest of the block is properly indented.
Which language seems to have the issue?
YAML
Are you using
highlight
orhighlightAuto
?highlight
Sample Code to Reproduce
Additional context
I was able to workaround the issue by replacing this regex with
It's not perfect and still has some false positives/negatives but should cover more valid cases.
The text was updated successfully, but these errors were encountered: