Open edbighead opened 3 years ago
I think this needs to happen first: https://github.com/alecthomas/chroma/issues/373.
Additionally, it would be easier to identify ranges of line numbers in the URL fragment if a hyphen was not appended to the string specified in lineanchors
. If you have two code blocks on a page, and you set lineanchors
for each block as A
and B
respectively, the fragment to specify lines 2-4 would look like #B-2-4
or #B-2-B-4
. In GitHub it looks like #L4-L7
which is simpler to parse.
It is possible to highlight some lines in Highlight Shortcode using
hl_lines
parameter andanchorlinenos
can be used to reference some specific lines of code.While having a documentation website with code examples, it would be handy to reference some lines of code and have a highlight on them, like it's done on Github