Liferay.Loader.define("journal-web$codemirror@5.65.2/addon/fold/markdown-fold",["module","exports","require","../../lib/codemirror"],(function(e,r,o){var i,n=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),n=r.getLine(o.line+1),t=headerLevel(o.line,i,n);if(100!==t){for(var d=r.lastLine(),a=o.line,l=r.getLine(a+2);a<d&&!(headerLevel(a+1,n,l)<=t);)++a,n=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 n&&n.amd?n(["../../lib/codemirror"],i):i(CodeMirror)}));
//# sourceMappingURL=markdown-fold.js.map