MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / list

Method list

web/marked.min.js:711–867  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

709 }
710 }
711 list(e) {
712 let t = this.rules.block.list.exec(e);
713 if (t) {
714 let n = t[1].trim(),
715 s = n.length > 1,
716 i = {
717 type: "list",
718 raw: "",
719 ordered: s,
720 start: s ? +n.slice(0, -1) : "",
721 loose: !1,
722 items: [],
723 };
724 ((n = s ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`),
725 this.options.pedantic && (n = s ? n : "[*+-]"));
726 let r = this.rules.other.listItemRegex(n),
727 o = !1;
728 for (; e; ) {
729 let c = !1,
730 p = "",
731 u = "";
732 if (!(t = r.exec(e)) || this.rules.block.hr.test(e)) break;
733 ((p = t[0]), (e = e.substring(p.length)));
734 let d = t[2]
735 .split(
736 `
737`,
738 1,
739 )[0]
740 .replace(this.rules.other.listReplaceTabs, (Z) =>
741 " ".repeat(3 * Z.length),
742 ),
743 g = e.split(
744 `
745`,
746 1,
747 )[0],
748 T = !d.trim(),
749 f = 0;
750 if (
751 (this.options.pedantic
752 ? ((f = 2), (u = d.trimStart()))
753 : T
754 ? (f = t[1].length + 1)
755 : ((f = t[2].search(this.rules.other.nonSpaceChar)),
756 (f = f > 4 ? 1 : f),
757 (u = d.slice(f)),
758 (f += t[1].length)),
759 T &&
760 this.rules.other.blankLine.test(g) &&
761 ((p +=
762 g +
763 `
764`),
765 (e = e.substring(g.length + 1)),
766 (c = !0)),
767 !c)
768 ) {

Callers 3

blockquoteMethod · 0.80
blockTokensMethod · 0.80
parseMethod · 0.80

Calls 2

blockTokensMethod · 0.80
listitemMethod · 0.80

Tested by

no test coverage detected