Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround for Chroma detecting line feed as error
Glamour renders \n as visible error when rendering VimL code blocks. This is due to lexer bug in Chroma, now fixed, but yet to be released, combined with the code block error style in Glamour rendering errors with a red background (rather than Chroma default of using red text). See alecthomas/chroma#827 for more info Updating Glamour styles to use red text rather than a red background works around this, because there is no printable text to highlight. Note that for dracula, the style for generic deleted and error are now the same, but this seems a reasonable compromise as generic deleted is primarily for diffs, which seem less likely to result in lexer errors. Although this might seem like a fugly hack to address one specific issue, it seems a pretty reasonable default to me as Glamour has no control over Chroma's parsing of code blocks, only the highlighting, and barring a new release of Glamour with updated dependencies, cannot do anything about Chroma lexer errors other than highlight them.
- Loading branch information