UNPKG

packdir-cli

Version:
30 lines 919 B
"use strict"; /** * Customize marked. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.pdMarked = void 0; const marked_1 = require("marked"); Object.defineProperty(exports, "pdMarked", { enumerable: true, get: function () { return marked_1.marked; } }); /** * Override image renderer. */ const renderer = { image(href, title, text) { console.log('IN huhu: ', href); console.log('---------------------05-'); href = 'file:///mnt/d/Henry/packdir/pd/alice.jpg'; //href = cleanUrl(this.options.sanitize, this.options.baseUrl, href); if (href === null) { return text; } let out = '<img src="' + href + '" alt="' + text + '"'; if (title) { out += ' title="' + title + '"'; } out += '/>'; return out; } }; marked_1.marked.use({ renderer }); //# sourceMappingURL=pd-marked.js.map