shime / livedown

Live Markdown previews for your favorite editor.
MIT License
765 stars 45 forks source link

hljs (Highlight.js) language detection should be disabled #2

Closed amontalenti closed 9 years ago

amontalenti commented 9 years ago

The npm module (livedown) uses highlight.js for code highlighting with default options. For a standard README.md I just opened, it thought some Python code blocks were alternatively nginx or bash, because they were very short, thus did wrong syntax highlighting. You probably want to turn off language auto-detection. You can do this by doing:

hljs.configure({languages: []})

before calling hljs.highlightBlock(). HTH. Originally reported on HN.

shime commented 9 years ago

:heart: