From 0cab74c1ff029ac9f83dc53a9711c28c723666e6 Mon Sep 17 00:00:00 2001 From: Markus Pettersson Date: Thu, 27 Jun 2024 10:40:52 +0200 Subject: [PATCH] Allow whitespace in HTML tags in translations --- gui/scripts/verify-translations-format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/scripts/verify-translations-format.ts b/gui/scripts/verify-translations-format.ts index ad11d634ec75..e44997d579ed 100644 --- a/gui/scripts/verify-translations-format.ts +++ b/gui/scripts/verify-translations-format.ts @@ -73,7 +73,7 @@ function checkHtmlTagsImpl(value: string): { correct: boolean, amount: number } for (let tag of tagTypes) { const selfClosing = tag.endsWith('/'); const endTag = tag.startsWith('/'); - tag = endTag ? tag.slice(1) : selfClosing ? tag.slice(0, -1) : tag; + tag = endTag ? tag.slice(1) : selfClosing ? tag.slice(0, -1).trim() : tag; if (!ALLOWED_TAGS.includes(tag)) { console.error(`Tag "<${tag}>" not allowed: "${value}"`);