import { markdownLineEnding as e } from "../../../micromark-util-character/index.js";
import { factorySpace as t } from "../../../micromark-factory-space/index.js";
//#region ../../node_modules/micromark/lib/initialize/content.js
var n = { tokenize: r };
function r(n) {
	let r = n.attempt(this.parser.constructs.contentInitial, a, o), i;
	return r;
	function a(e) {
		if (e === null) {
			n.consume(e);
			return;
		}
		return n.enter("lineEnding"), n.consume(e), n.exit("lineEnding"), t(n, r, "linePrefix");
	}
	function o(e) {
		return n.enter("paragraph"), s(e);
	}
	function s(e) {
		let t = n.enter("chunkText", {
			contentType: "text",
			previous: i
		});
		return i && (i.next = t), i = t, c(e);
	}
	function c(t) {
		if (t === null) {
			n.exit("chunkText"), n.exit("paragraph"), n.consume(t);
			return;
		}
		return e(t) ? (n.consume(t), n.exit("chunkText"), s) : (n.consume(t), c);
	}
}
//#endregion
export { n as content };
