jstransformers / Jstransformer Highlight
Licence: mit
Highlight.js support for JSTransformers.
Programming Languages
javascript
184084 projects - #8 most used programming language
jstransformer-highlight
Highlight.js support for JSTransformers.
Options
-
lang
- The language the code is in -
auto
- defaults totrue
iflang
is undefined. Set this totrue
to have highlight.js auto-detect the language. Set this tofalse
to disable auto-detection even when there is nolang
option.
Example
var highlight = require('jstransformer')(require('jstransformer-highlight'))
highlight.render('var i = 5 + 10;', { lang: 'javascript' }).body
//=> '<span class=\"hljs-variable\"><span class=\"hljs-keyword\">var</span> i</span> = <span class=\"hljs-number\">5</span> + <span class=\"hljs-number\">10</span>;'
License
MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].