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