diff options
Diffstat (limited to 'lib/parse/page.js')
-rw-r--r-- | lib/parse/page.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/parse/page.js b/lib/parse/page.js index cfe1da8..75eca9d 100644 --- a/lib/parse/page.js +++ b/lib/parse/page.js @@ -4,6 +4,9 @@ var hljs = require('highlight.js'); var renderer = require('./renderer'); +var lnormalize = require('../utils/lang').normalize; + + // Synchronous highlighting with highlight.js marked.setOptions({ highlight: function (code, lang) { @@ -101,7 +104,7 @@ function parsePage(src, options) { }); // Languages in code blocks - var langs = _.pluck(codeNodes, 'lang'); + var langs = _.pluck(codeNodes, 'lang').map(lnormalize); // Check that they are all the same var validLangs = _.all(_.map(langs, function(lang) { |