Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

syntax highlighting patch #5

wants to merge 6 commits into


None yet
2 participants

Hi Tiark,

I added a stripped version of highlight.js (I couldn't figure out how to reuse the library as-is). The only difference is that I removed all the DOM manipulation because we know which nodes we want to replace, and I exported the core highlighting function. I highlight on blur and on session load. I also added a <code> tag inside the <pre> to make the CSS from highlight.js reusable.

I'm a total JavaScript/HTML noob, so please be wary of the patch ;-)

It works for me though :-)



TiarkRompf commented Oct 11, 2010

cool, I'll take a look after tomorrow. you're highlighting only on blur, not as you type, right?

yes, blur and session load

adriaanm added some commits Oct 12, 2010

improved highlighting so it doesnt break inserting new input fields: …
…removed code tag, using html(newHtml) instead of replaceWith(newNode) to set highlighted code
why define an extractor
when you can interpolate a string instead?

@adriaanm adriaanm closed this Jan 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment