[latex3-commits] [latex3/l3build] main: Extend normalization of line numbers (835050f)
github at latex-project.org
github at latex-project.org
Thu Feb 8 12:21:13 CET 2024
Repository : https://github.com/latex3/l3build
On branch : main
Link : https://github.com/latex3/l3build/commit/835050f6f61b670b415094e5f3b3d1e2195d0b0c
>---------------------------------------------------------------
commit 835050f6f61b670b415094e5f3b3d1e2195d0b0c
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Feb 8 11:21:13 2024 +0000
Extend normalization of line numbers
>---------------------------------------------------------------
835050f6f61b670b415094e5f3b3d1e2195d0b0c
CHANGELOG.md | 4 ++++
l3build-check.lua | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2f5f843..0b90947 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Changed
+- Extend normalization of line numbers to include those wrapped by LaTeX in
+ text `on line ...`
+
## [2024-01-18]
### Added
diff --git a/l3build-check.lua b/l3build-check.lua
index 9bfb099..8121871 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -200,6 +200,10 @@ local function normalize_log(content,engine,errlevels)
-- Two similar cases, Lua patterns mean we need to do them separately
line = gsub(line, "on line %d*", "on line ...")
line = gsub(line, "on input line %d*", "on input line ...")
+ -- And the case where LaTeX has wrapped
+ if match(line,"^%(%w+%)%s+%d+%.$") then
+ line = gsub(line,"%((%w+)%)(%s+)%d+%.", "(%1)%2....")
+ end
-- Tidy up to ^^ notation
for i = 0, 31 do
line = gsub(line, char(i), "^^" .. char(64 + i))
More information about the latex3-commits
mailing list.