[latex3-commits] [latex3/tagpdf] develop: speed up luatex, no regex ... (7b196b2)
github at latex-project.org
github at latex-project.org
Tue Mar 19 20:06:52 CET 2024
Repository : https://github.com/latex3/tagpdf
On branch : develop
Link : https://github.com/latex3/tagpdf/commit/7b196b2eb50d0dc15c86c6925c10f827860f5b30
>---------------------------------------------------------------
commit 7b196b2eb50d0dc15c86c6925c10f827860f5b30
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Mar 19 20:06:52 2024 +0100
speed up luatex, no regex ...
>---------------------------------------------------------------
7b196b2eb50d0dc15c86c6925c10f827860f5b30
tagpdf-struct.dtx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tagpdf-struct.dtx b/tagpdf-struct.dtx
index 64bd8f4..fbe5c2d 100644
--- a/tagpdf-struct.dtx
+++ b/tagpdf-struct.dtx
@@ -791,14 +791,14 @@
% break into two or more mcid. In this case the lua code has to convert
% put the dictionary of the kid into an array. See issue 13 at tagpdf repo.
% We exchange the dummy command for the kids to mark this case.
+% Change 2024-03-19: don't use a regex - that is slow.
% \begin{macrocode}
\cs_new_protected:Npn\@@_struct_exchange_kid_command:N #1 %#1 = seq var
{
\seq_gpop_left:NN #1 \l_@@_tmpa_tl
- \regex_replace_once:nnN
- { \c{\@@_mc_insert_mcid_kids:n} }
- { \c{\@@_mc_insert_mcid_single_kids:n} }
- \l_@@_tmpa_tl
+ \tl_replace_once:Nnn \l_@@_tmpa_tl
+ {\@@_mc_insert_mcid_kids:n}
+ {\@@_mc_insert_mcid_single_kids:n}
\seq_gput_left:NV #1 \l_@@_tmpa_tl
}
More information about the latex3-commits
mailing list.