UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

47 lines (46 loc) 1.43 kB
"use client"; import { factorySpace as h } from "../../micromark-factory-space/index.js"; import { markdownLineEndingOrSpace as c, markdownLineEnding as m, markdownSpace as C } from "../../micromark-util-character/index.js"; const l = { name: "tasklistCheck", tokenize: L }; function g() { return { text: { 91: l } }; } function L(n, i, r) { const k = this; return e; function e(t) { return ( // Exit if there’s stuff before. k.previous !== null || // Exit if not in the first content that is the first child of a list // item. !k._gfmTasklistFirstContentOfListItem ? r(t) : (n.enter("taskListCheck"), n.enter("taskListCheckMarker"), n.consume(t), n.exit("taskListCheckMarker"), u) ); } function u(t) { return c(t) ? (n.enter("taskListCheckValueUnchecked"), n.consume(t), n.exit("taskListCheckValueUnchecked"), a) : t === 88 || t === 120 ? (n.enter("taskListCheckValueChecked"), n.consume(t), n.exit("taskListCheckValueChecked"), a) : r(t); } function a(t) { return t === 93 ? (n.enter("taskListCheckMarker"), n.consume(t), n.exit("taskListCheckMarker"), n.exit("taskListCheck"), s) : r(t); } function s(t) { return m(t) ? i(t) : C(t) ? n.check({ tokenize: o }, i, r)(t) : r(t); } } function o(n, i, r) { return h(n, k, "whitespace"); function k(e) { return e === null ? r(e) : i(e); } } export { g as gfmTaskListItem };