From dc2db841e0810e70587124391cdb95c0560af6d6 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Wed, 5 Jun 2024 09:28:10 +0000 Subject: Restore @x comment. Only replace leading '-' in @x comments. Also fix special case "@ @c" (with or without following space after '@'). git-svn-id: svn://tug.org/texlive/trunk@71439 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/tests/fix-changefile-lines.py | 4 ++-- Build/source/texk/web2c/tex.ch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Build/source/texk/web2c') diff --git a/Build/source/texk/web2c/tests/fix-changefile-lines.py b/Build/source/texk/web2c/tests/fix-changefile-lines.py index b5059d5ec27..19b8c32233d 100755 --- a/Build/source/texk/web2c/tests/fix-changefile-lines.py +++ b/Build/source/texk/web2c/tests/fix-changefile-lines.py @@ -75,7 +75,7 @@ class WebReader: self.part_cnt += 1 self.section_cnt += 1 - if re.search("^@ ", line): + if re.search("^@ ", line) or line == "@": self.section_cnt += 1 return (part, section, line_number), line @@ -169,7 +169,7 @@ class ChangeReader: pattern = " -+ " # Remove potentially text comment separator. if re.match(pattern, text): - text = re.sub(pattern, "", text).strip() + text = re.sub(pattern, "", text, 1).strip() # Create line with standard tag. new_line = f"@x [{part}.{section}] l.{line_number}" diff --git a/Build/source/texk/web2c/tex.ch b/Build/source/texk/web2c/tex.ch index 96603f96d0d..e57d494170a 100644 --- a/Build/source/texk/web2c/tex.ch +++ b/Build/source/texk/web2c/tex.ch @@ -2151,7 +2151,7 @@ if name=str_ptr-1 then {we can try to conserve string pool space now} begin job_name:=get_job_name(cur_name); open_log_file; @z -@x [29.537] l.10390 - - +@x [29.537] l.10390 if term_offset+length(name)>max_print_line-2 then print_ln else if (term_offset>0)or(file_offset>0) then print_char(" "); print_char("("); incr(open_parens); slow_print(name); update_terminal; @@ -3372,7 +3372,7 @@ else begin n:=cur_chr; get_r_token; p:=cur_cs; define(p,relax,256); @!flushable_string:str_number; {string not yet referenced} @y @z -@x [49.1260] l.23409 - new_font: string recyclingalready done +@x [49.1260] l.23409 - new_font: string recycling -- already done flushable_string:=str_ptr-1; @y @z @@ -3391,7 +3391,7 @@ flushable_string:=str_ptr-1; % % otherwise the wrong string will get removed by |flush_string|!! % -@x [49.1260] l.23412 - new_font: string recyclingalready done +@x [49.1260] l.23412 - new_font: string recycling -- already done begin if cur_name=flushable_string then begin flush_string; cur_name:=font_name[f]; end; -- cgit v1.2.3