@bobfrankston/rmfmail 1.2.333 → 1.2.335
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/client/android-bootstrap.bundle.js +8 -0
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/client/app.bundle.js +2 -1
- package/client/app.bundle.js.map +2 -2
- package/client/components/message-viewer.js +6 -1
- package/client/components/message-viewer.js.map +1 -1
- package/client/components/message-viewer.ts +6 -1
- package/client/compose/compose.bundle.js +42 -5
- package/client/compose/compose.bundle.js.map +4 -4
- package/client/compose/compose.js +7 -2
- package/client/compose/compose.js.map +1 -1
- package/client/compose/compose.ts +7 -2
- package/client/package.json +1 -1
- package/package.json +5 -5
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +7 -1
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +7 -1
- package/packages/mailx-service/package.json +1 -1
- package/packages/mailx-service/sync-queue.d.ts +7 -0
- package/packages/mailx-service/sync-queue.d.ts.map +1 -1
- package/packages/mailx-service/sync-queue.js +9 -0
- package/packages/mailx-service/sync-queue.js.map +1 -1
- package/packages/mailx-service/sync-queue.ts +10 -0
- package/packages/mailx-settings/package.json +1 -1
- package/packages/mailx-store/package.json +1 -1
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-types/index.d.ts.map +1 -1
- package/packages/mailx-types/index.js +14 -0
- package/packages/mailx-types/index.js.map +1 -1
- package/packages/mailx-types/index.ts +13 -0
- package/packages/mailx-types/package.json +1 -1
|
@@ -3383,6 +3383,14 @@ function htmlToPlainText(html) {
|
|
|
3383
3383
|
const t = text.replace(/<[^>]+>/g, "").trim();
|
|
3384
3384
|
return t && t !== href ? `${t} (${href})` : href;
|
|
3385
3385
|
});
|
|
3386
|
+
s = s.replace(/<img\b[^>]*>/gi, (tag) => {
|
|
3387
|
+
const src = (tag.match(/\bsrc\s*=\s*(['"])([^'"]*)\1/i) || [])[2]?.trim() || "";
|
|
3388
|
+
const alt = (tag.match(/\balt\s*=\s*(['"])([^'"]*)\1/i) || [])[2]?.trim() || "";
|
|
3389
|
+
const remote = /^https?:\/\//i.test(src);
|
|
3390
|
+
if (remote)
|
|
3391
|
+
return alt ? `[image: ${alt}] (${src})` : `(${src})`;
|
|
3392
|
+
return alt ? `[image: ${alt}]` : "[image]";
|
|
3393
|
+
});
|
|
3386
3394
|
s = s.replace(/<[^>]+>/g, "");
|
|
3387
3395
|
s = s.replace(/ /gi, " ").replace(/&/gi, "&").replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/'/gi, "'").replace(/'/gi, "'").replace(/—/gi, "\u2014").replace(/–/gi, "\u2013").replace(/…/gi, "\u2026").replace(/&#(\d+);/g, (_m, n) => String.fromCodePoint(parseInt(n, 10))).replace(/&#x([0-9a-f]+);/gi, (_m, h) => String.fromCodePoint(parseInt(h, 16)));
|
|
3388
3396
|
s = s.replace(/[ \t]+/g, " ").split("\n").map((l) => l.replace(/^[ \t]+|[ \t]+$/g, "")).join("\n").replace(/\n{3,}/g, "\n\n").trim();
|