To support synatx highlighting for blocks of markdown, we would need to: 1. identify the block 2. determine the source type (e.g. the language post-fix at the start of the block) 3. extract the block body 4. run in through a syntax highlighter 5. return the HTML This could be done with either the following oldie-but-goodie or something like it: - https://sourceforge.net/p/syntaxhighlight/code/HEAD/tree/highlight/langDefs/ Then, there's the JS approach where we could use this: - https://github.com/isagalaev/highlight.js/ - https://highlightjs.org/static/demo/ I guess it's more modern to go with the latter approach ;-) Will need to figure out how it works: - http://highlightjs.readthedocs.org/en/latest/api.html (Note, content for this ticket taken from a comment in https://github.com/lfe/docs3/issues/1 made on Mar 14, 2016.) Part of epic #66
Activity
yurrriq commentedon Feb 23, 2017
+1 for highlight.js
oubiwann commentedon Feb 23, 2017
Yeah, doing this in the browser would make our lives much, much easier.
prertik commentedon Oct 18, 2017
Yeah for this, we need to add support for lfe like that of clojure highlight.js/clojure.js and then add highlight.js in our docs site.