(i)
| 36 | `+x.slice(u);else{if(B||C.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||m.test(C)||v.test(C)||f.test(C))break;g+=` |
| 37 | `+d}B=!d.trim(),l+=M+` |
| 38 | `,i=i.substring(M.length+1),C=x.slice(u)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(a=!0)),n.items.push({type:"list_item",raw:l,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),n.raw+=l}let r=n.items.at(-1);if(r)r.raw=r.raw.trimEnd(),r.text=r.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let s of n.items){if(this.lexer.state.top=!1,s.tokens=this.lexer.blockTokens(s.text,[]),s.task){if(s.text=s.text.replace(this.rules.other.listReplaceTask,""),s.tokens[0]?.type==="text"||s.tokens[0]?.type==="paragraph"){s.tokens[0].raw=s.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),s.tokens[0].text=s.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}}let l=this.rules.other.listTaskCheckbox.exec(s.raw);if(l){let g={type:"checkbox",raw:l[0]+" ",checked:l[0]!=="[ ]"};s.checked=g.checked,n.loose?s.tokens[0]&&["paragraph","text"].includes(s.tokens[0].type)&&"tokens"in s.tokens[0]&&s.tokens[0].tokens?(s.tokens[0].raw=g.raw+s.tokens[0].raw,s.tokens[0].text=g.raw+s.tokens[0].text,s.tokens[0].tokens.unshift(g)):s.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):s.tokens.unshift(g)}}if(!n.loose){let l=s.tokens.filter(C=>C.type==="space"),g=l.length>0&&l.some(C=>this.rules.other.anyLine.test(C.raw));n.loose=g}}if(n.loose)for(let s of n.items){s.loose=!0;for(let l of s.tokens)l.type==="text"&&(l.type="paragraph")}return n}}html(i){let e=this.rules.block.html.exec(i);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(i){let e=this.rules.block.def.exec(i);if(e){let A=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),t=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:A,raw:e[0],href:t,title:n}}}table(i){let e=this.rules.block.table.exec(i);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let A=gK(e[1]),t=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(` |
| 39 | `):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(A.length===t.length){for(let a of t)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<A.length;a++)o.header.push({text:A[a],tokens:this.lexer.inline(A[a]),header:!0,align:o.align[a]});for(let a of n)o.rows.push(gK(a,o.header.length).map((r,s)=>({text:r,tokens:this.lexer.inline(r),header:!1,align:o.align[s]})));return o}}lheading(i){let e=this.rules.block.lheading.exec(i);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(i){let e=this.rules.block.paragraph.exec(i);if(e){let A=e[1].charAt(e[1].length-1)===` |
| 40 | `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:A,tokens:this.lexer.inline(A)}}}text(i){let e=this.rules.block.text.exec(i);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(i){let e=this.rules.inline.escape.exec(i);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(i){let e=this.rules.inline.tag.exec(i);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(i){let e=this.rules.inline.link.exec(i);if(e){let A=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(A)){if(!this.rules.other.endAngleBracket.test(A))return;let o=NQ(A.slice(0,-1),"\\");if((A.length-o.length)%2===0)return}else{let o=TiA(e[2],"()");if(o===-2)return;if(o>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let t=e[2],n="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(t);o&&(t=o[1],n=o[3])}else n=e[3]?e[3].slice(1,-1):"";return t=t.trim(),this.rules.other.startAngleBracket.test(t)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(A)?t=t.slice(1):t=t.slice(1,-1)),cK(e,{href:t&&t.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(i,e){let A;if((A=this.rules.inline.reflink.exec(i))||(A=this.rules.inline.nolink.exec(i))){let t=(A[2]||A[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[t.toLowerCase()];if(!n){let o=A[0].charAt(0);return{type:"text",raw:o,text:o}}return cK(A,n,A[0],this.lexer,this.rules)}}emStrong(i,e,A=""){let t=this.rules.inline.emStrongLDelim.exec(i);if(!(!t||t[3]&&A.match(this.rules.other.unicodeAlphaNumeric))&&(!(t[1]||t[2])||!A||this.rules.inline.punctuation.exec(A))){let n=[...t[0]].length-1,o,a,r=n,s=0,l=t[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*i.length+n);(t=l.exec(e))!=null;){if(o=t[1]||t[2]||t[3]||t[4]||t[5]||t[6],!o)continue;if(a=[...o].length,t[3]||t[4]){r+=a;continue}else if((t[5]||t[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(r-=a,r>0)continue;a=Math.min(a,a+r+s);let g=[...t[0]][0].length,C=i.slice(0,n+t.index+g+a);if(Math.min(n,a)%2){let B=C.slice(1,-1);return{type:"em",raw:C,text:B,tokens:this.lexer.inlineTokens(B)}}let d=C.slice(2,-2);return{type:"strong",raw:C,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(i){let e=this.rules.inline.code.exec(i);if(e){let A=e[2].replace(this.rules.other.newLineCharGlobal," "),t=this.rules.other.nonSpaceChar.test(A),n=this.rules.other.startingSpaceChar.test(A)&&this.rules.other.endingSpaceChar.test(A);return t&&n&&(A=A.substring(1,A.length-1)),{type:"codespan",raw:e[0],text:A}}}br(i){let e=this.rules.inline.br.exec(i);if(e)return{type:"br",raw:e[0]}}del(i,e,A=""){let t=this.rules.inline.delLDelim.exec(i);if(t&&(!t[1]||!A||this.rules.inline.punctuation.exec(A))){let n=[...t[0]].length-1,o,a,r=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,e=e.slice(-1*i.length+n);(t=s.exec(e))!=null;){if(o=t[1]||t[2]||t[3]||t[4]||t[5]||t[6],!o||(a=[...o].length,a!==n))continue;if(t[3]||t[4]){r+=a;continue}if(r-=a,r>0)continue;a=Math.min(a,a+r);let l=[...t[0]][0].length,g=i.slice(0,n+t.index+l+a),C=g.slice(n,-n);return{type:"del",raw:g,text:C,tokens:this.lexer.inlineTokens(C)}}}}autolink(i){let e=this.rules.inline.autolink.exec(i);if(e){let A,t;return e[2]==="@"?(A=e[1],t="mailto:"+A):(A=e[1],t=A),{type:"link",raw:e[0],text:A,href:t,tokens:[{type:"text",raw:A,text:A}]}}}url(i){let e;if(e=this.rules.inline.url.exec(i)){let A,t;if(e[2]==="@")A=e[0],t="mailto:"+A;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);A=e[0],e[1]==="www."?t="http://"+e[0]:t=e[0]}return{type:"link",raw:e[0],text:A,href:t,tokens:[{type:"text",raw:A,text:A}]}}}inlineText(i){let e=this.rules.inline.text.exec(i);if(e){let A=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:A}}}},Tg=class Cb{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||W1,this.options.tokenizer=this.options.tokenizer||new Ef,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let A={other:Rs,block:Bf.normal,inline:RQ.normal};this.options.pedantic?(A.block=Bf.pedantic,A.inline=RQ.pedantic):this.options.gfm&&(A.block=Bf.gfm,this.options.breaks?A.inline=RQ.breaks:A.inline=RQ.gfm),this.tokenizer.rules=A}static get rules(){return{block:Bf,inline:RQ}}static lex(e,A){return new Cb(A).lex(e)}static lexInline(e,A){return new Cb(A).inlineTokens(e)}lex(e){e=e.replace(Rs.carriageReturn,` |
| 41 | `),this.blockTokens(e,this.tokens);for(let A=0;A<this.inlineQueue.length;A++){let t=this.inlineQueue[A];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,A=[],t=!1){for(this.options.pedantic&&(e=e.replace(Rs.tabCharGlobal," ").replace(Rs.spaceLine,""));e;){let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},e,A))?(e=e.substring(n.raw.length),A.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let a=A.at(-1);n.raw.length===1&&a!==void 0?a.raw+=` |
no outgoing calls
no test coverage detected