Closed dbaynard closed 7 years ago
TODO
SourceLine
in div
div
Just thinking about that list of tasks; wrapping each line of code in its own div
could be a standalone change (the first two tasks) that would be very useful beyond this issue. Any change will break code relying on css selectors like code > span
; I don't know how important that might be.
Any change will break code relying on css selectors like code > span; I don't know how important that might be.
It might be fairly important, because people may be using templates that hard-code CSS for highlighting, and the default CSS has always used code > span
. So there's a potential for breaking existing documents.
~I can just add extra selectors for the css to cover both cases! (Turns out it's an easy solution...)~ I'll discuss in the PR
The issue raised in jgm/pandoc#3838 :
corresponds to this library.
(from that linked issue:)
Any solution must preserve behaviour of copy-paste: line numbers must not be copied.
Wrapping each line in a
div.sourceLine
is trivial; the question concerns the remaining behaviour. Options are:div.sourceLine::before
) in custom css inserted into each file.For the former case, a fairly minimal css required looks like:
and produces