js-highlight

0.1.0 • Public • Published

js-highlight

Highlight JavaScript code with support of PEG.js.

install

npm install js-highlight

usage

<link rel="stylesheet" href="highlight.css">
 
<pre data-src="code-example"></pre>
 
<script type="text/sourcecode" id="code-example">
function sayHi() {
    console.log('Hello, world');
}
 
sayHi();
</script> 
<script src="highlight.min.js"></script>

Readme

Keywords

none

Package Sidebar

Install

npm i js-highlight

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • luobo-modules