From: Bruno Haible Date: Sun, 16 Sep 2018 23:27:02 +0000 (+0200) Subject: Fix "Unescaped left brace in regex is deprecated here" warnings from Perl 5.26. X-Git-Tag: v0.20~383 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5feed3e70907ed6720079c03dd74724bb1537a52;p=thirdparty%2Fgettext.git Fix "Unescaped left brace in regex is deprecated here" warnings from Perl 5.26. Reported and patch by Jehan at . * gettext-tools/doc/texi2html: Escape braces in regular expressions. * gettext-runtime/libasprintf/texi2html: Likewise. --- diff --git a/gettext-runtime/libasprintf/texi2html b/gettext-runtime/libasprintf/texi2html index 7c94d5b62..aab84e970 100755 --- a/gettext-runtime/libasprintf/texi2html +++ b/gettext-runtime/libasprintf/texi2html @@ -879,7 +879,7 @@ while ($_ = &next_line) { s/\@refill\s+//g; # other substitutions &simple_substitutions; - s/\@value{($VARRE)}/$value{$1}/eg; + s/\@value\{($VARRE)\}/$value{$1}/eg; s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4 # # analyze the tag again @@ -1204,7 +1204,7 @@ while (@lines) { # # xref # - while (/\@(x|px|info|)ref{($XREFRE)(}?)/o) { + while (/\@(x|px|info|)ref\{($XREFRE)(\}?)/o) { # note: Texinfo may accept other characters ($type, $nodes, $full) = ($1, $2, $3); ($before, $after) = ($`, $'); @@ -1810,7 +1810,7 @@ sub substitute_style { while ($changed) { $changed = 0; $done = ''; - while (/\@(\w+|"|\~|,|\^){([^\{\}]+)}/) { + while (/\@(\w+|"|\~|,|\^)\{([^\{\}]+)\}/) { $text = &apply_style($1, $2); if ($text) { $_ = "$`$text$'"; diff --git a/gettext-tools/doc/texi2html b/gettext-tools/doc/texi2html index 7c94d5b62..aab84e970 100755 --- a/gettext-tools/doc/texi2html +++ b/gettext-tools/doc/texi2html @@ -879,7 +879,7 @@ while ($_ = &next_line) { s/\@refill\s+//g; # other substitutions &simple_substitutions; - s/\@value{($VARRE)}/$value{$1}/eg; + s/\@value\{($VARRE)\}/$value{$1}/eg; s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4 # # analyze the tag again @@ -1204,7 +1204,7 @@ while (@lines) { # # xref # - while (/\@(x|px|info|)ref{($XREFRE)(}?)/o) { + while (/\@(x|px|info|)ref\{($XREFRE)(\}?)/o) { # note: Texinfo may accept other characters ($type, $nodes, $full) = ($1, $2, $3); ($before, $after) = ($`, $'); @@ -1810,7 +1810,7 @@ sub substitute_style { while ($changed) { $changed = 0; $done = ''; - while (/\@(\w+|"|\~|,|\^){([^\{\}]+)}/) { + while (/\@(\w+|"|\~|,|\^)\{([^\{\}]+)\}/) { $text = &apply_style($1, $2); if ($text) { $_ = "$`$text$'";