Ignore:
Timestamp:
2017-07-07T19:19:14+12:00 (7 years ago)
Author:
ak19
Message:

When testing GS3.08's GLI on Ubuntu v 16.04, found its perl v 5.22.1 issued warnings about unescaped left brace in regex. As per https://unix.stackexchange.com/questions/238539/automake-error-unescaped-left-brace-in-regex-is-deprecated, in even later versions of perl, this counts as a syntax error rather than resulting in a warning. So making the minimum number of changes that allowed perl to parse the plugins and open GLI successfully, without issuing warnings on perl 5.22.1 on this Ubuntu 16.04.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/BibTexPlugin.pm

    r31492 r31780  
    791791
    792792    # quoted { } chars
    793     $text =~ s@\\{@{@g;
     793    $text =~ s@\\\{@{@g;
    794794    $text =~ s@\\}@}@g;
    795795
     
    805805
    806806    $text =~ s@\\infty@infinity@g;       # or unicode 0x221E...
    807     $text =~ s@\^{(.*?)}@<sup>$1</sup>@g; # superscript
     807    $text =~ s@\^\{(.*?)}@<sup>$1</sup>@g; # superscript
    808808    $text =~ s@\^([^\{])@<sup>$1</sup>@g;
    809     $text =~ s@\_{(.*?)}@<sub>$1</sub>@g; # subscript
     809    $text =~ s@\_\{(.*?)}@<sub>$1</sub>@g; # subscript
    810810    $text =~ s@\_([^\{])@<sub>$1</sub>@g;
    811811
Note: See TracChangeset for help on using the changeset viewer.