shipseal 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -369,7 +369,7 @@ function firstSentence(text) {
369
369
  return /^(.+?[.?!])\s+[A-Z]/.exec(collapsed)?.[1] ?? collapsed;
370
370
  }
371
371
  function cleanLine(text) {
372
- const stripped = text.replaceAll("", ":").replaceAll("–", "-").replaceAll("!", ".").trim();
372
+ const stripped = text.replace(/\s*\u2014\s*/g, ": ").replace(/\s+\u2013\s+/g, ", ").replaceAll("–", "-").replaceAll("!", ".").replace(/\s+/g, " ").trim();
373
373
  const noTrail = stripped.endsWith(".") ? stripped.slice(0, -1) : stripped;
374
374
  const first = noTrail.at(0);
375
375
  if (first === void 0) return noTrail;