diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2024-06-05 06:51:57 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2024-06-05 06:51:57 +0000 |
commit | efe255ce57bcddf8fc8373373ca36c79825307e8 (patch) | |
tree | 0199c88fb871858655c0c3d20949d8a7f7f12ef4 /Build/source/texk/web2c/tests | |
parent | dc7e64261a0dc8f27947faf8c8c422588f47ba7c (diff) |
[WEB] Correctly count section start markers.
Both WEAVE.WEB and TANGLE.WEB have '@*' and '@ ' markers in their
exposition. Only those at the beginning of a 'line' count.
Make the 'fix-changefile-lines.py' self-executable (on Linux).
git-svn-id: svn://tug.org/texlive/trunk@71437 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/tests')
-rwxr-xr-x[-rw-r--r--] | Build/source/texk/web2c/tests/fix-changefile-lines.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/tests/fix-changefile-lines.py b/Build/source/texk/web2c/tests/fix-changefile-lines.py index 3f8c2465525..b5059d5ec27 100644..100755 --- a/Build/source/texk/web2c/tests/fix-changefile-lines.py +++ b/Build/source/texk/web2c/tests/fix-changefile-lines.py @@ -71,9 +71,12 @@ class WebReader: section = self.section_cnt line_number = self._pos - part_inc = line.count("@*") - self.part_cnt += part_inc - self.section_cnt += line.count("@ ") + part_inc + if re.search("^@\*", line): + self.part_cnt += 1 + self.section_cnt += 1 + + if re.search("^@ ", line): + self.section_cnt += 1 return (part, section, line_number), line |