Merge pull request #3636 from flozz/syntax-highlight

Highlight code in articles using highlight.js
This commit is contained in:
Jérémy Benoist
2018-06-07 06:22:14 +00:00
committed by GitHub
3 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,8 @@
import 'highlight.js/styles/atom-one-light.css';
import * as hljs from 'highlight.js';
window.addEventListener('load', () => {
document.querySelectorAll('pre').forEach((node) => {
hljs.highlightBlock(node);
});
});