Hi,
I would like to load and disply the complete source code. For most of the time it is not very interesting to see stuff like imports or helper functions. Thus I would like to hide those not importent parts until the reader chooses to see them or to copy everything into their code.
I would imagine something like the following.
// highlight.js:no-display
import a
import b
import c
// highlight.js:display
cool code is here
and here
// highlight.js:no-display
Sorry, this is waay out of scope of highlight.js. I don't want to start an argument about the idea itself (it seems too baroque for my taste) but I'm certain that we don't want to include anything like this.
Having said that, it can be implemented outside of highlight.js: you can mark up your code with <span>s needed for folding and highlight.js won't break them while adding its own highlighting mark up.