blob: 72f1288393ac26f898788ed5f1244556d45b3786 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
From efde0da129154376bebcfff6a47424669bb849df Mon Sep 17 00:00:00 2001
From: Gavin Smith <gavinsmith0123@gmail.com>
Date: Fri, 13 Jul 2018 15:31:28 +0000
Subject: [PATCH] escape braces in regex
git-svn-id: svn://127.0.0.1/svn_repo/texinfo/trunk@8007 39fee189-59d7-47db-b5d4-205258b72aed
diff --git a/tp/Texinfo/Parser.pm b/tp/Texinfo/Parser.pm
index ba1cd423d..b5eece680 100644
--- a/tp/Texinfo/Parser.pm
+++ b/tp/Texinfo/Parser.pm
@@ -5531,11 +5531,11 @@ sub _parse_special_misc_command($$$$)
}
} elsif ($command eq 'clickstyle') {
# REMACRO
- if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) {
+ if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*/) {
$args = ['@'.$1];
$self->{'clickstyle'} = $1;
$remaining = $line;
- $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
+ $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
$has_comment = 1 if (defined($4));
} else {
$self->line_error (sprintf($self->__(
--
2.20.1
|