]> git.proxmox.com Git - proxmox-i18n.git/commitdiff
js generator: use word-boundary anchor in regex
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 Apr 2023 12:09:05 +0000 (14:09 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 Apr 2023 12:12:31 +0000 (14:12 +0200)
to avoid some edge case false positives.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
jsgettext.pl

index d2f293e23dc40c13c3b3c15eff981fc14c818f67..689ffcc2118ef97e15a944131753a2e869e67605 100755 (executable)
@@ -93,7 +93,7 @@ sub extract_msg {
 
     while(1) {
        my $text;
-       if ($line =~ m/\Wgettext\s*\((("((?:[^"\\]++|\\.)*+)")|('((?:[^'\\]++|\\.)*+)'))\)/g) {
+       if ($line =~ m/\bgettext\s*\((("((?:[^"\\]++|\\.)*+)")|('((?:[^'\\]++|\\.)*+)'))\)/g) {
            $text = $3 || $5;
        }