Liferay.Loader.define("portal-search-web$codemirror@5.62.0/addon/edit/continuelist",["module","exports","require","../../lib/codemirror"],(function(e,n,t){window,function(e){"use strict";var n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;function r(e,t){var i=t.line,r=0,o=0,l=n.exec(e.getLine(i)),s=l[1];do{var a=i+(r+=1),d=e.getLine(a),c=n.exec(d);if(c){var f=c[1],u=parseInt(l[3],10)+r-o,h=parseInt(c[3],10),p=h;if(s!==f||isNaN(h)){if(s.length>f.length)return;if(s.length<f.length&&1===r)return;o+=1}else u===h&&(p=h+1),u>h&&(p=u+1),e.replaceRange(d.replace(n,f+p+c[4]+c[5]),{line:a,ch:0},{line:a,ch:d.length})}}while(c)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var l=o.listSelections(),s=[],a=0;a<l.length;a++){var d=l[a].head,c=o.getStateAfter(d.line),f=e.innerMode(o.getMode(),c);if("markdown"!==f.mode.name)return void o.execCommand("newlineAndIndent");var u=!1!==(c=f.state).list,h=0!==c.quote,p=o.getLine(d.line),g=n.exec(p),m=/^\s*$/.test(p.slice(0,d.ch));if(!l[a].empty()||!u&&!h||!g||m)return void o.execCommand("newlineAndIndent");if(t.test(p)){var v=h&&/>\s*$/.test(p),x=!/>\s*$/.test(p);(v||x)&&o.replaceRange("",{line:d.line,ch:0},{line:d.line,ch:d.ch+1}),s[a]="\n"}else{var w=g[1],I=g[5],b=!(i.test(g[2])||g[2].indexOf(">")>=0),L=b?parseInt(g[3],10)+1+g[4]:g[2].replace("x"," ");s[a]="\n"+w+L+I,b&&r(o,d)}}o.replaceSelections(s)}}("object"==typeof n&&"object"==typeof e?t("../../lib/codemirror"):CodeMirror)}));
//# sourceMappingURL=continuelist.js.map