mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 17:37:24 +08:00
21 lines
795 B
JavaScript
21 lines
795 B
JavaScript
"use strict";
|
|
// markdown-it plugin for wrapping <pre> ... </pre>.
|
|
//
|
|
// If your plugin was chained before preWrapper, you can add additional eleemnt directly.
|
|
// If your plugin was chained after preWrapper, you can use these slots:
|
|
// 1. <!--beforebegin-->
|
|
// 2. <!--afterbegin-->
|
|
// 3. <!--beforeend-->
|
|
// 4. <!--afterend-->
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.preWrapperPlugin = void 0;
|
|
exports.preWrapperPlugin = (md) => {
|
|
const fence = md.renderer.rules.fence;
|
|
md.renderer.rules.fence = (...args) => {
|
|
const [tokens, idx] = args;
|
|
const token = tokens[idx];
|
|
const rawCode = fence(...args);
|
|
return `<div class="language-${token.info.trim()}">${rawCode}</div>`;
|
|
};
|
|
};
|
|
//# sourceMappingURL=preWrapper.js.map
|