!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((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],p=parseInt(l[3],10)+r-o,m=parseInt(c[3],10),u=m;if(s!==f||isNaN(m)){if(s.length>f.length)return;if(s.lengthm&&(u=p+1),e.replaceRange(d.replace(n,f+u+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\s*$/.test(u),x=!/>\s*$/.test(u);(v||x)&&o.replaceRange("",{line:d.line,ch:0},{line:d.line,ch:d.ch+1}),s[a]="\n"}else{var w=h[1],I=h[5],b=!(i.test(h[2])||h[2].indexOf(">")>=0),y=b?parseInt(h[3],10)+1+h[4]:h[2].replace("x"," ");s[a]="\n"+w+y+I,b&&r(o,d)}}o.replaceSelections(s)}}));