I was just thinking and it all has to be one pre/code block due to a row counter I have. Using two separate ones resets the counter. Also I have the code section modifiable (contenteditable=true) and two separate ones would have two separate regions. Not very good.
So I need something to insert into my pre/code section which will make highlightjs try and re-find what language it is. Perhaps this is something I need to modify myself.
Edit-Just opened up the highlight pack.js file…Dear lord…
Note that if you look at the source. I have two pre/code blocks in there. Remove the second one (to only have one) and you’ll see the CSS is completely unstyled. Since the highlightjs thinks the entire block is HTML.
Yes, it’s because, as I said, I have them in two separate pre/code. However, the numbering on the left is screwed up. Also, dpending if you clicked the HTML or the CSS, you’d have two editable fields (because of my contenteditable=true in my HTML for each block.)
I’ll make it one big block now. Please refresh the page.
I’d also like this to take into account lines which wrap. I’d like a second number given depending on if it wraps once…twice (2 line numbers) etc.
Hmm, wait. Perhaps I could, in JS, set that attribute like you were talking about @cpradio. What do ou think about an if statement which detects whether a future code block exists. If so, then set a number to start at? Did you try that? Not sure what you all tried.