import { markdownSpace as e } from "../micromark-util-character/index.js";
//#region ../../node_modules/micromark-factory-space/index.js
function t(t, n, r, i) {
	let a = i ? i - 1 : Infinity, o = 0;
	return s;
	function s(i) {
		return e(i) ? (t.enter(r), c(i)) : n(i);
	}
	function c(i) {
		return e(i) && o++ < a ? (t.consume(i), c) : (t.exit(r), n(i));
	}
}
//#endregion
export { t as factorySpace };
