From e828167f62e15cd7340d140968d3298e3cdba6bd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 17 Sep 2018 01:31:31 +0200 Subject: Fix "Unescaped left brace in regex" warnings from Perl 5.26. Reported and patch by Jehan at . * doc/texi2html: Escape braces in regular expressions. --- ChangeLog | 7 +++++++ doc/texi2html | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f12859d..f302edd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2018-09-16 Bruno Haible + + Fix "Unescaped left brace in regex" warnings from Perl 5.26. + Reported and patch by Jehan at + . + * doc/texi2html: Escape braces in regular expressions. + 2018-09-14 Bruno Haible doc: Assume texinfo 4.0 or newer. diff --git a/doc/texi2html b/doc/texi2html index 5ada126..ca8b5fc 100755 --- a/doc/texi2html +++ b/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$'"; -- cgit v1.2.1