@taufik-nurrohman/highlight.ln.js
v2.0.0
Published
Line number plugin for Highlight.js
Downloads
11
Maintainers
Readme
Line Number Plugin for Highlight.js
Usage
Browser
<script src="highlight.min.js"></script>
<script src="highlight.ln.js/index.min.js"></script>
<script>
hljs.highlightAll();
</script>
Node.js
import hljs from 'highlight.js/lib/core';
import css from 'highlight.js/lib/languages/css';
import LineNumberPlugin from '@taufik-nurrohman/highlight.ln.js';
hljs.addPlugin(LineNumberPlugin);
hljs.registerLanguage('css', css);
hljs.highlightAll();
CommonJS
const hljs = require('highlight.js/lib/core');
const css = require('highlight.js/lib/languages/css');
const LineNumberPlugin = require('@taufik-nurrohman/highlight.ln.js').default;
hljs.addPlugin(LineNumberPlugin);
hljs.registerLanguage('css', css);
hljs.highlightAll();
License
BSD