texlive[48828] Master/tlpkg/TeXLive/TLPOBJ.pm: fix parsing error of

commits+preining at tug.org commits+preining at tug.org
Thu Oct 4 16:15:16 CEST 2018


Revision: 48828
          http://tug.org/svn/texlive?view=revision&revision=48828
Author:   preining
Date:     2018-10-04 16:15:15 +0200 (Thu, 04 Oct 2018)
Log Message:
-----------
fix parsing error of docfile data, github issue 2

Modified Paths:
--------------
    trunk/Master/tlpkg/TeXLive/TLPOBJ.pm

Modified: trunk/Master/tlpkg/TeXLive/TLPOBJ.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLPOBJ.pm	2018-10-04 00:18:18 UTC (rev 48827)
+++ trunk/Master/tlpkg/TeXLive/TLPOBJ.pm	2018-10-04 14:15:15 UTC (rev 48828)
@@ -119,16 +119,17 @@
           # do manual parsing
           # this is not optimal, but since we support only two tags there
           # are not so many cases
-          if ($rest =~ m/^details="(.*)"\s*$/) {
-            $self->{'docfiledata'}{$f}{'details'} = $1;
-          } elsif ($rest =~ m/^language="(.*)"\s*$/) {
-            $self->{'docfiledata'}{$f}{'language'} = $1;
-          } elsif ($rest =~ m/^language="(.*)"\s+details="(.*)"\s*$/) {
+          # Warning: need tp check the double cases first!!!
+          if ($rest =~ m/^language="(.*)"\s+details="(.*)"\s*$/) {
             $self->{'docfiledata'}{$f}{'details'} = $2;
             $self->{'docfiledata'}{$f}{'language'} = $1;
           } elsif ($rest =~ m/^details="(.*)"\s+language="(.*)"\s*$/) {
             $self->{'docfiledata'}{$f}{'details'} = $1;
             $self->{'docfiledata'}{$f}{'language'} = $2;
+          } elsif ($rest =~ m/^details="(.*)"\s*$/) {
+            $self->{'docfiledata'}{$f}{'details'} = $1;
+          } elsif ($rest =~ m/^language="(.*)"\s*$/) {
+            $self->{'docfiledata'}{$f}{'language'} = $1;
           } else {
             tlwarn("$0: Unparsable tagging in TLPDB line: $line\n");
           }



More information about the tex-live-commits mailing list