1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Highlight code in articles using highlight.js

This commit is contained in:
Fabien LOISON 2018-04-23 19:11:24 +02:00
parent 11f15430ff
commit b2e7b8b600
No known key found for this signature in database
GPG key ID: FF90CA148348048E
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);
});
});