Add highlighting of code snippets with numbered lines enabled.
This commit is contained in:
parent
3730b32107
commit
52e734fb3c
3 changed files with 23 additions and 7 deletions
|
|
@ -8,15 +8,9 @@
|
|||
</footer>
|
||||
<script src="https://cdn.bootcss.com/instantclick/3.0.1/instantclick.min.js" data-no-instant></script>
|
||||
<script data-no-instant>InstantClick.init();</script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js" data-no-instant></script>
|
||||
<script data-no-instant>
|
||||
hljs.initHighlightingOnLoad();
|
||||
addMenuListener();
|
||||
InstantClick.on('change', function() {
|
||||
var blocks = document.querySelectorAll('pre code');
|
||||
for (var i = 0; i < blocks.length; i++) {
|
||||
hljs.highlightBlock(blocks[i]);
|
||||
}
|
||||
addMenuListener();
|
||||
});
|
||||
function addMenuListener() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue