Skip to content
Snippets Groups Projects
Commit 920ee616 authored by Alexey Lunin's avatar Alexey Lunin
Browse files

QR code trimming. Add support for spaces

parent c70c01ff
No related branches found
No related tags found
1 merge request!40QR code trimming. Add support for spaces
......@@ -8,6 +8,6 @@ exports.removeSpacesAndLinebreaks = (s) => {
};
exports.removeQRCodes = (s) => {
return s
.replace(/\[qrcode.png\]<https:\/\/[\w./?=\-&]+>/g, "")
.replace(/<https:\/\/[\w./?=\-&]+>\[qrcode.png\]/g, "");
.replace(/\[qrcode.png\]\s*<https:\/\/[\w./?=\-&]+>/g, "")
.replace(/<https:\/\/[\w./?=\-&]+>\s*\[qrcode.png\]/g, "");
};
......@@ -7,6 +7,6 @@ export const removeSpacesAndLinebreaks = (s: string): string => {
export const removeQRCodes = (s: string): string => {
return s
.replace(/\[qrcode.png\]<https:\/\/[\w./?=\-&]+>/g, "")
.replace(/<https:\/\/[\w./?=\-&]+>\[qrcode.png\]/g, "");
.replace(/\[qrcode.png\]\s*<https:\/\/[\w./?=\-&]+>/g, "")
.replace(/<https:\/\/[\w./?=\-&]+>\s*\[qrcode.png\]/g, "");
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment