keewis / blackdoc

run black on documentation code snippets
https://blackdoc.readthedocs.io
MIT License
47 stars 4 forks source link

colorize trailing whitespace #120

Closed keewis closed 2 years ago

keewis commented 2 years ago

When trailing whitespace is removed, blackdoc would output two equal lines, one prefixed with -, one with +. Since this is confusing, it is better to colorize the removed whitespace.

(This won't happen at all if blackdoc is run after other formatters that take care of trailing whitespace)