import { convert } from "html-to-text";
function htmlToPlainText(html) {
  if (!html) return "";
  return convert(html, {
    wordwrap: false,
    preserveNewlines: true,
    selectors: [
      { selector: "script", format: "skip" },
      { selector: "style", format: "skip" }
    ]
  }).replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
}
export {
  htmlToPlainText
};
//# sourceMappingURL=htmlToPlainText.js.map
