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