I use the Highlight.js library to highlight the code syntax in Blogger and refuse to highlight the Lisp code correctly.
In a blogger article:
<pre><code class="lisp"> (coerce (average 1 2 3 4) 'float) > 2.5 </code></pre>
In the project template before closing </head> :
<script src='http://yandex.st/highlightjs/7.0/lisp.min.js' ></script> <script src='http://yandex.st/highlightjs/7.0/highlight.min.js' ></script> <link href='http://yandex.st/highlightjs/7.0/styles/github.min.css' rel='stylesheet' /> <script type='text/javascript'> hljs.initHighlightingOnLoad(); </script>
After opening the article, the highlighting is broken, Firebug shows this in the HTML panel:
<pre> <code class="lisp ruby"> // WTF ... stylized RUBY tokens here ... </code> </pre>
In some snippets of code, highlighter places <code class="lisp undefined"> and doesn't want to highlight at all. Since I'm at Blogger, I really don't want to download anything anywhere, especially when language packs are already released. What magic should I do for Lisp to be recognizable?
source share