Skip to content

Commit 014b75d

Browse files
authored
syntax highlighting for server-rendered markdown
1 parent ea5835c commit 014b75d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

js/wq/markdown.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ marked.setOptions({
5757
}
5858
});
5959

60+
// Run for server-rendered markdown
61+
md.run = function($page) {
62+
$page.find('pre code:not(.hljs)').each(function(i, el) {
63+
highlight.highlightBlock(el);
64+
});
65+
};
66+
6067
return md;
6168

6269
});

0 commit comments

Comments
 (0)