// Modified version of https://github.com/Kriegslustig/showdown-footnotes /*! showdown-prettify 06-01-2016 */ (function (extension) { 'use strict'; if (typeof showdown !== 'undefined') { extension(showdown); } else if (typeof define === 'function' && define.amd) { define(['showdown'], extension); } else if (typeof exports === 'object') { module.exports = extension(require('showdown')); } else { throw Error('Could not find showdown library'); } }(function (showdown) { 'use strict'; showdown.extension('footnotes', function () { return [{ type: 'lang', filter: function filter(text) { return text.replace(/\[\^([\d\w]+)\]:\s*((\n+(\s{2,4}|\t).+)+)/mgi, function (str, name, rawContent, _, padding) { let content = converter.makeHtml(rawContent.replace(new RegExp(`^${padding}`, 'gm'), '')); return `
[${name}]:${content}
`; }); } }, { type: 'lang', filter: function filter(text) { return text.replace(/\[\^([\d\w]+)\]:( |\n)((.+\n)*.+)/mgi, function (str, name, _, content) { return `[${name}]: ${content}`; }); } }, { type: 'lang', filter: function filter(text) { return text.replace(/\[\^([\d\w]+)\]/mgi, function (str, name) { return `[${name}]`; }); } }]; }); })); //# sourceMappingURL=showdown-prettify.js.map