import { stringifyEntities } from "../stringify-entities/lib-index.js";
const textEntitySubset = ["<", "&"];
function text(node, _, parent, state) {
  return parent && parent.type === "element" && (parent.tagName === "script" || parent.tagName === "style") ? node.value : stringifyEntities(
    node.value,
    Object.assign({}, state.settings.characterReferences, {
      subset: textEntitySubset
    })
  );
}
export {
  text
};
//# sourceMappingURL=lib-handle-text.js.map
