diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2018-06-07 06:22:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-07 06:22:14 +0000 |
commit | 36054f5dd42413ed5877db8c50fe9f1a3c6167c6 (patch) | |
tree | 9fd9d3861231d72fa57594d9665f99ee749f584f /app/Resources/static/themes/_global/js | |
parent | c00a69101902edfa35d8ef06e2f806cda21b9b27 (diff) | |
parent | b2e7b8b6005b0f4493bfd69e6f0a981bd16f09d9 (diff) | |
download | wallabag-36054f5dd42413ed5877db8c50fe9f1a3c6167c6.tar.gz wallabag-36054f5dd42413ed5877db8c50fe9f1a3c6167c6.tar.zst wallabag-36054f5dd42413ed5877db8c50fe9f1a3c6167c6.zip |
Merge pull request #3636 from flozz/syntax-highlight
Highlight code in articles using highlight.js
Diffstat (limited to 'app/Resources/static/themes/_global/js')
-rw-r--r-- | app/Resources/static/themes/_global/js/highlight.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Resources/static/themes/_global/js/highlight.js b/app/Resources/static/themes/_global/js/highlight.js new file mode 100644 index 00000000..4025fc14 --- /dev/null +++ b/app/Resources/static/themes/_global/js/highlight.js | |||
@@ -0,0 +1,8 @@ | |||
1 | import 'highlight.js/styles/atom-one-light.css'; | ||
2 | import * as hljs from 'highlight.js'; | ||
3 | |||
4 | window.addEventListener('load', () => { | ||
5 | document.querySelectorAll('pre').forEach((node) => { | ||
6 | hljs.highlightBlock(node); | ||
7 | }); | ||
8 | }); | ||