Liferay.Loader.define("liferay!template-web$codemirror@5.65.2/addon/fold/markdown-fold",["module","exports","require","../../lib/codemirror"],(function(e,r,o){var i,t=void 0;window;i=function(e){"use strict";e.registerHelper("fold","markdown",(function(r,o){function isHeader(o){var i=r.getTokenTypeAt(e.Pos(o,0));return i&&/\bheader\b/.test(i)}function headerLevel(e,r,o){var i=r&&r.match(/^#+/);return i&&isHeader(e)?i[0].length:(i=o&&o.match(/^[=\-]+\s*$/))&&isHeader(e+1)?"="==o[0]?1:2:100}var i=r.getLine(o.line),t=r.getLine(o.line+1),n=headerLevel(o.line,i,t);if(100!==n){for(var d=r.lastLine(),a=o.line,l=r.getLine(a+2);a<d&&!(headerLevel(a+1,t,l)<=n);)++a,t=l,l=r.getLine(a+2);return{from:e.Pos(o.line,i.length),to:e.Pos(a,r.getLine(a).length)}}}))},"object"==typeof r&&"object"==typeof e?i(o("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}));
//# sourceMappingURL=markdown-fold.js.map