"use client";
import { stringifyEntities as n } from "../../../stringify-entities/lib/index.js";
const i = /^>|^->|<!--|-->|--!>|<!-$/g, o = [">"], r = ["<", ">"];
function b(t, m, u, e) {
  return e.settings.bogusComments ? "<?" + n(
    t.value,
    Object.assign({}, e.settings.characterReferences, {
      subset: o
    })
  ) + ">" : "<!--" + t.value.replace(i, s) + "-->";
  function s(c) {
    return n(
      c,
      Object.assign({}, e.settings.characterReferences, {
        subset: r
      })
    );
  }
}
export {
  b as comment
};
