UNPKG

@forbespro/lead-agent

Version:
2 lines (1 loc) 1.13 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index161.js"),o=require("./index146.js"),x={name:"codeIndented",tokenize:h},c={partial:!0,tokenize:m};function h(t,d,l){const r=this;return u;function u(n){return t.enter("codeIndented"),g.factorySpace(t,s,"linePrefix",5)(n)}function s(n){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(n):l(n)}function e(n){return n===null?f(n):o.markdownLineEnding(n)?t.attempt(c,e,f)(n):(t.enter("codeFlowValue"),i(n))}function i(n){return n===null||o.markdownLineEnding(n)?(t.exit("codeFlowValue"),e(n)):(t.consume(n),i)}function f(n){return t.exit("codeIndented"),d(n)}}function m(t,d,l){const r=this;return u;function u(e){return r.parser.lazy[r.now().line]?l(e):o.markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),u):g.factorySpace(t,s,"linePrefix",5)(e)}function s(e){const i=r.events[r.events.length-1];return i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?d(e):o.markdownLineEnding(e)?u(e):l(e)}}exports.codeIndented=x;