"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index$1 = require("../micromark-factory-space/index.cjs");
const index = require("../micromark-util-character/index.cjs");
function factoryWhitespace(effects, ok) {
  let seen;
  return start;
  function start(code) {
    if (index.markdownLineEnding(code)) {
      effects.enter("lineEnding");
      effects.consume(code);
      effects.exit("lineEnding");
      seen = true;
      return start;
    }
    if (index.markdownSpace(code)) {
      return index$1.factorySpace(effects, start, seen ? "linePrefix" : "lineSuffix")(code);
    }
    return ok(code);
  }
}
exports.factoryWhitespace = factoryWhitespace;
//# sourceMappingURL=index.cjs.map
