Newer
Older
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizePlainPart = void 0;
const utils_1 = require("../utils");
const normalizePlainPart = (text) => {
text = utils_1.removeSpacesAndLinebreaks(text);
return removeQRCodes(text);
};
exports.normalizePlainPart = normalizePlainPart;
const removeQRCodes = (s) => {
return s
.replace(/\[qrcode.png]\s*<https:\/\/[\w./?=\-&]+>/g, "")
.replace(/<https:\/\/[\w./?=\-&]+>\s*\[qrcode.png]/g, "");
};
const removeListBullets = (s) => {
return s.replace("\n[o§]\n+/g", "");
};