@bobfrankston/rmfmail 1.1.199 → 1.1.201

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.
@@ -188,7 +188,15 @@ async function extractPreview(source: string): Promise<{ bodyHtml: string; bodyT
188
188
  // from a Quill compose pasted-image HTML) collapsed to [image] too.
189
189
  let raw: string;
190
190
  if (bodyHtml) {
191
+ // Drop the CONTENTS of style/script/head blocks and HTML comments
192
+ // first — a plain tag-strip removes the <style> tags but leaves the
193
+ // CSS rules between them, which then leak into the preview as
194
+ // `*{box-sizing:border-box}` / `@media …{ … }` garbage (Bob's
195
+ // 2026-05-31 marketing-mail shot). Order matters: kill blocks, then
196
+ // images → [image], then any remaining tags.
191
197
  raw = bodyHtml
198
+ .replace(/<!--[\s\S]*?-->/g, " ")
199
+ .replace(/<(style|script|head)\b[^>]*>[\s\S]*?<\/\1>/gi, " ")
192
200
  .replace(/<img\b[^>]*>/gi, " [image] ")
193
201
  .replace(/<[^>]+>/g, " ");
194
202
  } else {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.77",
3
+ "version": "0.1.78",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bobfrankston/mailx-imap",
9
- "version": "0.1.77",
9
+ "version": "0.1.78",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@bobfrankston/iflow-direct": "^0.1.27",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.77",
3
+ "version": "0.1.78",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-settings",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",