import { factorySpace as l } from "../../../../../micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.js";
import { markdownLineEnding as m } from "../../../../../micromark-util-character@2.1.1/node_modules/micromark-util-character/index.js";
const g = {
  tokenize: x
};
function x(n) {
  const i = n.attempt(this.parser.constructs.contentInitial, e, p);
  let r;
  return i;
  function e(t) {
    if (t === null) {
      n.consume(t);
      return;
    }
    return n.enter("lineEnding"), n.consume(t), n.exit("lineEnding"), l(n, i, "linePrefix");
  }
  function p(t) {
    return n.enter("paragraph"), u(t);
  }
  function u(t) {
    const a = n.enter("chunkText", {
      contentType: "text",
      previous: r
    });
    return r && (r.next = a), r = a, o(t);
  }
  function o(t) {
    if (t === null) {
      n.exit("chunkText"), n.exit("paragraph"), n.consume(t);
      return;
    }
    return m(t) ? (n.consume(t), n.exit("chunkText"), u) : (n.consume(t), o);
  }
}
export {
  g as content
};
//# sourceMappingURL=content.js.map
