UNPKG

highlight-ts

Version:

Highlight.JS in TypeScript (and ES6).

11 lines 465 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function escape(value) { return value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;'); } 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