Skip to content
Snippets Groups Projects
Commit 774cf9c9 authored by Igor Markin's avatar Igor Markin
Browse files

Add build

parent f390f8b4
No related branches found
No related tags found
No related merge requests found
export declare const normalizeVendorHtml: (document: HTMLDocument, vendor: string) => string; export declare const normalizeVendorHtml: (document: HTMLDocument, vendor: string) => string;
export declare const extractPseudoPlainPart: (document: HTMLDocument) => string; export declare const extractPseudoPlainPart: (document: HTMLDocument) => string;
export declare const pruneHtmlNode: (node: Node) => boolean; 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 printHtmlChildren: (node: Node, depth: number) => string;
export declare const printHtmlNode: (node: Node, depth: number) => string; export declare const printHtmlNode: (node: Node, depth: number) => string;
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); 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 constants_1 = require("../constants");
const outlook_1 = require("./strategies/outlook"); const outlook_1 = require("./strategies/outlook");
const constants_2 = require("../constants"); const constants_2 = require("../constants");
...@@ -71,17 +71,6 @@ const pruneHtmlNode = (node) => { ...@@ -71,17 +71,6 @@ const pruneHtmlNode = (node) => {
return false; return false;
}; };
exports.pruneHtmlNode = pruneHtmlNode; 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) => { const printHtmlChildren = (node, depth) => {
let child = node.firstChild; let child = node.firstChild;
if (!child) { if (!child) {
......
...@@ -25,8 +25,8 @@ const patchOutlookSafelinksWrappers = (text) => { ...@@ -25,8 +25,8 @@ const patchOutlookSafelinksWrappers = (text) => {
}; };
const removeQRCodes = (s) => { const removeQRCodes = (s) => {
return s return s
.replace(/\[(image:\s)*qrcode.png]\s*<https:\/\/.+?>/g, "") .replace(/\[(image:\s)*qrcode.png]\s*<https:\/\/.+(vereign\.com|vrgnservices\.com).*?>/g, "")
.replace(/<https:\/\/.+?>\s*\[(image: )*qrcode.png]/g, ""); .replace(/<https:\/\/.+(vereign\.com|vrgnservices\.com).*?>\s*\[(image: )*qrcode.png]/g, "");
}; };
const cleanupHiddenCharacters = (s) => { const cleanupHiddenCharacters = (s) => {
const removeSymbols = new RegExp(/[\u200B]+/g); const removeSymbols = new RegExp(/[\u200B]+/g);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment