UNPKG

ll-package

Version:

2 lines (1 loc) 852 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../micromark-util-character/index.js");function h(r,b,e,o,i,x){const m=this;let t=0,l;return S;function S(n){return r.enter(o),r.enter(i),r.consume(n),r.exit(i),r.enter(x),a}function a(n){return t>999||n===null||n===91||n===93&&!l||n===94&&!t&&"_hiddenFootnoteSupport"in m.parser.constructs?e(n):n===93?(r.exit(x),r.enter(i),r.consume(n),r.exit(i),r.exit(o),b):g.markdownLineEnding(n)?(r.enter("lineEnding"),r.consume(n),r.exit("lineEnding"),a):(r.enter("chunkString",{contentType:"string"}),u(n))}function u(n){return n===null||n===91||n===93||g.markdownLineEnding(n)||t++>999?(r.exit("chunkString"),a(n)):(r.consume(n),l||(l=!g.markdownSpace(n)),n===92?E:u)}function E(n){return n===91||n===92||n===93?(r.consume(n),t++,u):u(n)}}exports.factoryLabel=h;