Item14686: Perl syntax is outdated in some cases

pencil
Priority: Enhancement
Current State: New
Released In: n/a
Target Release:
Applies To: Extension
Component: FootNotePlugin
Branches:
Reported By: StefanH
Waiting For:
Last Change By: StefanH
For latest Perl versions, there need to be some modifications:

--- FootNotePlugin.pm   2018-04-27 16:18:18.170177835 +0200
+++ FootNotePlugin-new.pm       2018-04-27 16:17:02.678346668 +0200
@@ -133,16 +133,16 @@
     # Translate all markup into the %FOOTNOTE{...}% form
     $_[0] =~
       s/%FOOTNOTELIST%/%STARTFOOTNOTE{LIST="$web.$topic"}%%ENDFOOTNOTE%/g;
-    $_[0] =~ s/%FOOTNOTE{(.*?)}%/%STARTFOOTNOTE{$1}%%ENDFOOTNOTE%/sg;
+    $_[0] =~ s/%FOOTNOTE\{(.*?)\}%/%STARTFOOTNOTE{$1}%%ENDFOOTNOTE%/sg;
     $_[0] =~
-      s/{{(?:(\w+)::)(.*?)}}/%STARTFOOTNOTE{LABEL="$1"}%$2%ENDFOOTNOTE%/sg;
+      s/\{\{(?:(\w+)::)(.*?)\}\}/%STARTFOOTNOTE{LABEL="$1"}%$2%ENDFOOTNOTE%/sg;
     $_[0] =~
-      s/{{(?:(\w):)(.*?)}}/%STARTFOOTNOTE{LABELFORMAT="$1"}%$2%ENDFOOTNOTE%/sg;
-    $_[0] =~ s/{{(.*?)}}/%STARTFOOTNOTE{}%$1%ENDFOOTNOTE%/sg;
+      s/\{\{(?:(\w):)(.*?)\}\}/%STARTFOOTNOTE{LABELFORMAT="$1"}%$2%ENDFOOTNOTE%/sg;
+    $_[0] =~ s/\{\{(.*?)\}\}/%STARTFOOTNOTE{}%$1%ENDFOOTNOTE%/sg;
 
     # Process all footnotes and footnote lists in page order.
     $_[0] =~
-s/%STARTFOOTNOTE{(.*?)}%(.*?)%ENDFOOTNOTE%/&noteHandler("$_[2].$_[1]",$1,$2)/sge;
+s/%STARTFOOTNOTE\{(.*?)\}%(.*?)%ENDFOOTNOTE%/&noteHandler("$_[2].$_[1]",$1,$2)/sge;
 }
 
 # =========================

-- StefanH - 27 Apr 2018

 
Topic revision: r1 - 27 Apr 2018, StefanH
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy