import { stringifyEntities as e } from "../../../stringify-entities/lib/index.js";
//#region ../../node_modules/hast-util-to-html/lib/handle/comment.js
var t = /^>|^->|<!--|-->|--!>|<!-$/g, n = [">"], r = ["<", ">"];
function i(i, a, o, s) {
	return s.settings.bogusComments ? "<?" + e(i.value, Object.assign({}, s.settings.characterReferences, { subset: n })) + ">" : "<!--" + i.value.replace(t, c) + "-->";
	function c(t) {
		return e(t, Object.assign({}, s.settings.characterReferences, { subset: r }));
	}
}
//#endregion
export { i as comment };
