charmbracelet / glamour

Stylesheet-based markdown rendering for your CLI apps 💇🏻‍♀️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

disable trailing space highlighting in code blocks

AlJohri opened this issue · comments

Is your feature request related to a problem? Please describe.
I find the bright pink trailing space highlighting very distracting. Example:

wget https://github.com/hyperium/tonic/raw/master/examples/helloworld-tutorial.md
glow helloworld-tutorial.md
Screenshot 2023-06-18 at 12 12 38 PM

Describe the solution you'd like
I expect to be able to render Markdown files like I would see them out in the wild on Github without the distracting highlighting for trailing spaces in code blocks. For example this is how helloworld-tutorial.md renders on Github.

Describe alternatives you've considered
alternative would be to to trim the file myself, but I expect to be able to read existing markdown files created by other people out of the box

Thanks for bringing this to our attention! I'm going to move it to our markdown rendering library so we can make sure it gets addressed in the upstream dependency.

fwiw this is happening because the trailing spaces are being rendered with GenericDeleted styles