I want to display some code in a block, and include line numbers. How can I get line numbers showing, that can’t be selected, that does not rely on Javascript?
Pastebin.com appears to be able to do this, but I can’t quite figure out how. Any ideas?
Thanks in advance!
Pastebin solves this by adding every line of the contents as a LI element in an ordered list.
The numbers from an such a list doesn’t get copied when selecting:
The rest is styling using css.