gulp-hihlight and it is modified to allow for manual language configuration.
This gulp plugin is based ongulp-snippet-highlight
Uses highlight.js to compile single html snippets. If no language
option is specified, your snippet will be compiled with an html
code highlighter as a default.
You can also pass in highlight.js configuration object as per highlight.js docs:
tabReplace
: a string used to replace TAB characters in indentation.useBR
: a flag to generate
tags instead of new-line characters in the output, useful when code is marked up using a non-container.
classPrefix
: a string prefix added before class names in the generated markup, used for backwards compatibility with stylesheets.languages
: an array of language names and aliases restricting auto detection to only these languages. Accepts an object r
Install
npm install --save-dev gulp-snippet-highlight
Example
var gulp = ;var highlight = ; gulp;
License
MIT © Kris Zima