highlight-ts
Version:
Highlight.JS in TypeScript (and ES6).
11 lines • 465 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function escape(value) {
return value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
}
exports.htmlRender = {
text: function (chunk) { return escape(chunk); },
join: function (chunks) { return chunks.join(''); },
wrap: function (className, chunk) { return "<span class=\"" + className + "\">" + chunk + "</span>"; }
};
//# sourceMappingURL=html.js.map