Line Numbering with CSS
I was asked about adding linenumbers to code blocks with only css properties in a github issue. Here is a fully contained, pretty simple example.
The line numbers are added by css, and (on most browsers) they are not selectable. So it is still easy to copy the correct code.
The relevant css file is also separated out.
def Hello_World():
print("Hello World")
return
def Goodbye_World():
print("Goodbye World")
return