From 6a870e98d7f94402e83c02e9d7dfffb15f9013e4 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 26 Sep 2018 22:20:34 +0200 Subject: Resolve incompatibility in "getfield" and "texinfo" plugins ... seen with recent versions of Perl: Failed to load plugin IkiWiki::Plugin::getfield: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/{{ <-- HERE \$([-\w/]+#)?[-\w]+}}/ at [...]/.library/IkiWiki/Plugin/getfield.pm line 68. Compilation failed in require at (eval 94) line 1. BEGIN failed--compilation aborted at (eval 94) line 1. --- .library/IkiWiki/Plugin/getfield.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '.library/IkiWiki/Plugin/getfield.pm') diff --git a/.library/IkiWiki/Plugin/getfield.pm b/.library/IkiWiki/Plugin/getfield.pm index 971e7ecb..fb876f35 100644 --- a/.library/IkiWiki/Plugin/getfield.pm +++ b/.library/IkiWiki/Plugin/getfield.pm @@ -65,13 +65,13 @@ sub do_filter (@) { my $page_type=pagetype($page_file); if (defined $page_type) { - while ($params{content} =~ /{{\$([-\w\/]+#)?[-\w]+}}/) + while ($params{content} =~ /\{\{\$([-\w\/]+#)?[-\w]+\}\}/) { # substitute {{$var}} variables (source-page) - $params{content} =~ s/{{\$([-\w]+)}}/get_field_value($1,$page)/eg; + $params{content} =~ s/\{\{\$([-\w]+)\}\}/get_field_value($1,$page)/eg; # substitute {{$page#var}} variables (source-page) - $params{content} =~ s/{{\$([-\w\/]+)#([-\w]+)}}/get_other_page_field_value($2,$page,$1)/eg; + $params{content} =~ s/\{\{\$([-\w\/]+)#([-\w]+)\}\}/get_other_page_field_value($2,$page,$1)/eg; } } @@ -79,12 +79,12 @@ sub do_filter (@) { $page_type=pagetype($page_file); if (defined $page_type) { - while ($params{content} =~ /{{\+\$([-\w\/]+#)?[-\w]+\+}}/) + while ($params{content} =~ /\{\{\+\$([-\w\/]+#)?[-\w]+\+\}\}/) { # substitute {{+$var+}} variables (dest-page) - $params{content} =~ s/{{\+\$([-\w]+)\+}}/get_field_value($1,$destpage)/eg; + $params{content} =~ s/\{\{\+\$([-\w]+)\+\}\}/get_field_value($1,$destpage)/eg; # substitute {{+$page#var+}} variables (source-page) - $params{content} =~ s/{{\+\$([-\w\/]+)#([-\w]+)\+}}/get_other_page_field_value($2,$destpage,$1)/eg; + $params{content} =~ s/\{\{\+\$([-\w\/]+)#([-\w]+)\+\}\}/get_other_page_field_value($2,$destpage,$1)/eg; } } -- cgit v1.2.3