azriel91 / peace

Zero Stress Automation
https://peace.mk
Apache License 2.0
109 stars 1 forks source link

Book: Code block line numbers #155

Closed azriel91 closed 8 months ago

azriel91 commented 1 year ago

Currently the book uses highlightjs-line-numbers.js@2.8.0, which:

Probably worth writing the same functionality without using <table> elements.

Figure out how to add <span>s for each line in the code block as a hljs plugin, then CSS counters to add the counter.

Links:

azriel91 commented 8 months ago

Closed by #163 in commit fcc0cb5d.

Source code of the highlightjs line numbers is at: https://github.com/azriel91/highlightjs-line-numbers.js/blob/feature/mdbook-support/src/highlightjs-line-numbers.js

Permanent solution would be solved in: https://github.com/rust-lang/mdBook/issues/1303