5
0
mirror of git://git.proxmox.com/git/proxmox-i18n.git synced 2025-02-05 01:47:01 +03:00

js generator: use word-boundary anchor in regex

to avoid some edge case false positives.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-04-17 14:09:05 +02:00
parent 052bd210b1
commit 78e560ba35

View File

@ -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;
}