mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-25 14:26:29 +00:00
15 lines
303 B
JavaScript
15 lines
303 B
JavaScript
'use strict';
|
|
|
|
var hljs = require('highlight.js');
|
|
|
|
module.exports = function (hljsOptions) {
|
|
hljs.configure(hljsOptions);
|
|
|
|
return function (example) {
|
|
if (hljsOptions.highlightAuto) {
|
|
return hljs.highlightAuto(example).value;
|
|
}
|
|
return hljs.highlight('js', example).value;
|
|
};
|
|
};
|