Skip to content

Commit

Permalink
syntax highlighting for server-rendered markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Dec 29, 2016
1 parent ea5835c commit 014b75d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/wq/markdown.js
Expand Up @@ -57,6 +57,13 @@ marked.setOptions({
}
});

// Run for server-rendered markdown
md.run = function($page) {
$page.find('pre code:not(.hljs)').each(function(i, el) {
highlight.highlightBlock(el);
});
};

return md;

});

0 comments on commit 014b75d

Please sign in to comment.