UNPKG

laif-ds

Version:

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

45 lines (44 loc) 1.3 kB
"use client"; import { factorySpace as h } from "../../micromark-factory-space/index.js"; import { markdownLineEnding as o } from "../../micromark-util-character/index.js"; const P = { name: "codeIndented", tokenize: p }, m = { partial: !0, tokenize: d }; function p(e, s, l) { const r = this; return u; function u(n) { return e.enter("codeIndented"), h(e, f, "linePrefix", 5)(n); } function f(n) { const a = r.events[r.events.length - 1]; return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(n) : l(n); } function t(n) { return n === null ? x(n) : o(n) ? e.attempt(m, t, x)(n) : (e.enter("codeFlowValue"), i(n)); } function i(n) { return n === null || o(n) ? (e.exit("codeFlowValue"), t(n)) : (e.consume(n), i); } function x(n) { return e.exit("codeIndented"), s(n); } } function d(e, s, l) { const r = this; return u; function u(t) { return r.parser.lazy[r.now().line] ? l(t) : o(t) ? (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), u) : h(e, f, "linePrefix", 5)(t); } function f(t) { const i = r.events[r.events.length - 1]; return i && i[1].type === "linePrefix" && i[2].sliceSerialize(i[1], !0).length >= 4 ? s(t) : o(t) ? u(t) : l(t); } } export { P as codeIndented };