Aloso / to-html

Utilities for making the colo documentation
MIT License
72 stars 10 forks source link

Does not support reversed i.e. code 7 #26

Open dhruvkb opened 1 year ago

dhruvkb commented 1 year ago

ANSI code 7 inverts the background and foreground colors, which can be helpful for giving the text a bold attention-grabbing appearance.

Screenshot 2023-07-23 at 5 04 32 AM

to-html does not render this properly, instead showing the text with regular background and foreground colors.

$ to-html 'printf '\''\e[7mHello World!\e[0m'\'''
<pre class="terminal">
<span class='shell'>&gt; </span><span class='cmd'>printf</span> <span class='str'>&#39;\e[7mHello World!\e[0m&#39;</span>
Hello World!<span class='shell'>&gt; </span><span class='caret'> </span>
</pre>
CosmicHorrorDev commented 9 months ago

@Aloso I can take this unless you want to save it for a new contributor

Aloso commented 9 months ago

@CosmicHorrorDev feel free!