hl_lines is not supported anymore
See original GitHub issueWith zmarkdown, when we want to use hl_lines on source codes, the render to rehype is not properly parsed.
the markdown
what we get
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-python">a = <span class="hljs-number">2</span>
b = a + <span class="hljs-number">5</span>
c = a + b
print(a, b, c)
</code></pre></div>
what we expect :
something that wraps line 3 (and all lines that are specified) so that css can color it. For example, it can be
<div class="hljs-code-div"><div class="hljs-line-numbers"><span></span><span></span><span></span><span></span></div><pre><code class="hljs language-python">a = <span class="hljs-number">2</span>
b = a + <span class="hljs-number">5</span>
<span class="hljs-highlight">c = a + b</span>
print(a, b, c)
</code></pre></div>
Nota : here are the supported syntax to specify lines :
hl_lines=3 // only line 3 will be highlighted
hl_lines=3,4 // line 3 and line 4
hl_lines=3-8 // line 3 to 8
hl_lines=3,5-8,15 // line 3, lines 5 to 8, line 15 will be highlighted
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error message: There's no line here to end - TeX
Empty lines above and below the opening caused the error. ... because TeX will not switch to horizontal mode (it will stay in...
Read more >XCode 14.0 comment shortcut not working anymore
XCode 14.0 comment shortcut not working anymore. You're now watching this thread ... Previously using ( ⌘ + / ) to comment a...
Read more >Pyplot hlines and vlines do not use the 'lines.color ... - GitHub
Bug report Bug summary hlines and vlines color does not default to lines.color in rcParams. The default argument is 'k' which doesn't work ......
Read more >matplotlib.pyplot.hlines — Matplotlib 3.6.2 documentation
Plot horizontal lines at each y from xmin to xmax. Parameters: yfloat or array-like ... If scalars are provided, all lines will have...
Read more >When I edit the code in a TextArea using CodeMirror how to ...
... you don't pass an onChange option anymore to register a change handler, ... onChange handling in code mirror is not like this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Today, I made a plugin highlighting specific lines. https://github.com/TRSasasusu/highlightjs-highlight-lines.js
Since this is now done, I think it can be closed!