texlive[67326] Master/tlpkg/TeXLive/TLPSRC.pm: (from_file): make

commits+karl at tug.org commits+karl at tug.org
Sun Jun 11 17:34:16 CEST 2023


Revision: 67326
          http://tug.org/svn/texlive?view=revision&revision=67326
Author:   karl
Date:     2023-06-11 17:34:16 +0200 (Sun, 11 Jun 2023)
Log Message:
-----------
(from_file): make <whitespace># within a line
start a comment (from Norbert).

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

Modified: trunk/Master/tlpkg/TeXLive/TLPSRC.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLPSRC.pm	2023-06-10 23:48:24 UTC (rev 67325)
+++ trunk/Master/tlpkg/TeXLive/TLPSRC.pm	2023-06-11 15:34:16 UTC (rev 67326)
@@ -113,6 +113,14 @@
   for my $line (@lines) {
     $lineno++;
     
+    # remove end of line comments
+    # we require "<space>#" because since we don't want an embedded # in
+    # long descriptions, as in urls, to be a comment.
+    # Do this *before* we check for continuation lines: A line
+    #      .... # foobar \
+    # should *not* be treated as continuation line.
+    $line =~ s/\s+#.*$//;
+
     # we allow continuation lines in tlpsrc files, i.e., lines ending with \.
     if ($line =~ /^(.*)\\$/) {
       $savedline .= $1;
@@ -779,6 +787,7 @@
 removed; no other whitespace is added or removed.
 
 Comment lines begin with a # and continue to the end of the line.
+Within a line, a # that is preceded by whitespace is also a comment.
 
 Blank lines are ignored.
 



More information about the tex-live-commits mailing list.