New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YAML multi-line strings inconsistencies #475
Comments
It seems that whitespace is rendered twice. Simple repro:
HTML of second line: <span style="color:#d88200"> </span> <span style="color:#ae81ff">value</span> The 2 spaces are rendered highlighted once inside the first |
Unfortunately YAML is horrifically difficult to parse, and Chroma's lexer is consequently not that robust. You can see the complexity in the Pygments lexer. |
I think it would be a good test case to verify whether the |
When the YAML block scalar (multiline string) syntax is used with only one line of text, the single line is not matched by the current regexp. It currently only works with at least two lines. This fixes the regexp by adding a special case for a single line after the first indentation in the block.
When the YAML block scalar (multiline string) syntax is used with only one line of text, the single line is not matched by the current regexp. It currently only works with at least two lines. This fixes the regexp by adding a special case for a single line after the first indentation in the block.
I think this was resolved with #724. I am now unable to reproduce the problem. |
In recent updates to Chroma, yaml multi-line strings (starting with
|
) seem to be rendered inconsistently.Example:
This renders as:
As you can see, if there's a single line in the multiline string, the number of spaces at the beginning is increased (to match the | character's position). The color is also different.
Adding more than one line with the same indentation (even if empty), fixes that.
While the resulting, rendered YAML is valid, it looks odd
The text was updated successfully, but these errors were encountered: