From 774cf9c95901b15bab208665a0d6d4bfc5f70ac5 Mon Sep 17 00:00:00 2001 From: igor <igor.markin@vereign.com> Date: Tue, 29 Dec 2020 19:54:38 +0300 Subject: [PATCH] Add build --- dist/HTMLNormalizer/HTMLNormalizer.d.ts | 1 - dist/HTMLNormalizer/HTMLNormalizer.js | 13 +------------ dist/PlainNormalizer/PlainNormalizer.js | 4 ++-- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/dist/HTMLNormalizer/HTMLNormalizer.d.ts b/dist/HTMLNormalizer/HTMLNormalizer.d.ts index c49c6e8..b5a3f47 100644 --- a/dist/HTMLNormalizer/HTMLNormalizer.d.ts +++ b/dist/HTMLNormalizer/HTMLNormalizer.d.ts @@ -1,6 +1,5 @@ export declare const normalizeVendorHtml: (document: HTMLDocument, vendor: string) => string; export declare const extractPseudoPlainPart: (document: HTMLDocument) => string; export declare const pruneHtmlNode: (node: Node) => boolean; -export declare const normalizeBodyAttributes: (node: Node, cleanupElementAttributes: (element: HTMLElement) => void) => void; export declare const printHtmlChildren: (node: Node, depth: number) => string; export declare const printHtmlNode: (node: Node, depth: number) => string; diff --git a/dist/HTMLNormalizer/HTMLNormalizer.js b/dist/HTMLNormalizer/HTMLNormalizer.js index 21d0c29..224b98d 100644 --- a/dist/HTMLNormalizer/HTMLNormalizer.js +++ b/dist/HTMLNormalizer/HTMLNormalizer.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.printHtmlNode = exports.printHtmlChildren = exports.normalizeBodyAttributes = exports.pruneHtmlNode = exports.extractPseudoPlainPart = exports.normalizeVendorHtml = void 0; +exports.printHtmlNode = exports.printHtmlChildren = exports.pruneHtmlNode = exports.extractPseudoPlainPart = exports.normalizeVendorHtml = void 0; const constants_1 = require("../constants"); const outlook_1 = require("./strategies/outlook"); const constants_2 = require("../constants"); @@ -71,17 +71,6 @@ const pruneHtmlNode = (node) => { return false; }; exports.pruneHtmlNode = pruneHtmlNode; -const normalizeBodyAttributes = (node, cleanupElementAttributes) => { - if (node.nodeType === constants_1.ELEMENT_NODE) { - cleanupElementAttributes(node); - } - let child = node.firstChild; - while (child) { - exports.normalizeBodyAttributes(child, cleanupElementAttributes); - child = child.nextSibling; - } -}; -exports.normalizeBodyAttributes = normalizeBodyAttributes; const printHtmlChildren = (node, depth) => { let child = node.firstChild; if (!child) { diff --git a/dist/PlainNormalizer/PlainNormalizer.js b/dist/PlainNormalizer/PlainNormalizer.js index 73a80cf..55ae65a 100644 --- a/dist/PlainNormalizer/PlainNormalizer.js +++ b/dist/PlainNormalizer/PlainNormalizer.js @@ -25,8 +25,8 @@ const patchOutlookSafelinksWrappers = (text) => { }; const removeQRCodes = (s) => { return s - .replace(/\[(image:\s)*qrcode.png]\s*<https:\/\/.+?>/g, "") - .replace(/<https:\/\/.+?>\s*\[(image: )*qrcode.png]/g, ""); + .replace(/\[(image:\s)*qrcode.png]\s*<https:\/\/.+(vereign\.com|vrgnservices\.com).*?>/g, "") + .replace(/<https:\/\/.+(vereign\.com|vrgnservices\.com).*?>\s*\[(image: )*qrcode.png]/g, ""); }; const cleanupHiddenCharacters = (s) => { const removeSymbols = new RegExp(/[\u200B]+/g); -- GitLab