You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Chroma highlight on Hugo websites, sometimes I would like to highlight the existence of invisible characters like space, tab, and CR/LF (at the end of each line before the last one). I see that there already exists .chroma .w class, and methods regarding TextWhitespace, but the whitespaces themselves are not marked-up.
The goal here is to have the tags with classes, so that style (especially pseudo elements) could be applied easily.
I reckon this is technically doable with Shortcodes and/or JavaScript, but the solution would be very messy and could easily miss some corner cases, so I am trying my luck here to see if you would consider adding this as a feature. Thanks a lot.
What feature do you propose?
Minimal example of what Chroma currently gives:
<divclass="highlight"><pretabindex="0" class="chroma"><codeclass="language-html" data-lang="html"><spanclass="line"><spanclass="cl"><spanclass="p"><</span><spanclass="nt">h1</span><spanclass="p">></span>
hello world
<spanclass="p"></</span><spanclass="nt">h1</span><spanclass="p">></span></span></span></code></pre></div>
What I would like to propose: .ws for space, .wt for tab, .wr for return / CRLF. (Just an example, the specific names of the classes are not important.)
Is there an existing issue for this?
What problem does this feature solve?
When using Chroma highlight on Hugo websites, sometimes I would like to highlight the existence of invisible characters like space, tab, and CR/LF (at the end of each line before the last one). I see that there already exists
.chroma .w
class, and methods regardingTextWhitespace
, but the whitespaces themselves are not marked-up.The goal here is to have the tags with classes, so that style (especially pseudo elements) could be applied easily.
I reckon this is technically doable with Shortcodes and/or JavaScript, but the solution would be very messy and could easily miss some corner cases, so I am trying my luck here to see if you would consider adding this as a feature. Thanks a lot.
What feature do you propose?
Minimal example of what Chroma currently gives:
What I would like to propose:
.ws
for space,.wt
for tab,.wr
for return / CRLF. (Just an example, the specific names of the classes are not important.)The text was updated successfully, but these errors were encountered: