[latex3-commits] [latex3/latex3] main: Retain end-of-input braces when stopping titlecasing (fba8cec81)
github at latex-project.org
github at latex-project.org
Tue Oct 17 23:07:27 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/fba8cec810c09dd87d5682104b3c179186ab0201
>---------------------------------------------------------------
commit fba8cec810c09dd87d5682104b3c179186ab0201
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Oct 17 22:07:27 2023 +0100
Retain end-of-input braces when stopping titlecasing
>---------------------------------------------------------------
fba8cec810c09dd87d5682104b3c179186ab0201
l3kernel/CHANGELOG.md | 1 +
l3kernel/l3text-case.dtx | 8 +++++---
l3kernel/testfiles/m3text002.luatex.tlg | 2 +-
l3kernel/testfiles/m3text002.ptex.tlg | 2 +-
l3kernel/testfiles/m3text002.tlg | 2 +-
l3kernel/testfiles/m3text002.uptex.tlg | 2 +-
l3kernel/testfiles/m3text002.xetex.tlg | 2 +-
7 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 810af1feb..9f0de45b2 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -20,6 +20,7 @@ this project uses date-based 'snapshot' version identifiers.
### Fixed
- Support arbitrary BCP-47 locales for case-changing overrides (issue \#1239)
+- Retain braces when ending titlecasing with some input structures
## [2023-10-10]
diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index e99be423a..6c9987016 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -133,7 +133,7 @@
% \begin{macro}[EXP]{\@@_change_case_result:n}
% \begin{macro}[EXP]{\@@_change_case_end:w}
% \begin{macro}[EXP]{\@@_change_case_loop:nnnw}
-% \begin{macro}[EXP]{\@@_change_case_break:w}
+% \begin{macro}[EXP]{\@@_change_case_break:w, \@@_change_case_break_aux:w}
% \begin{macro}[EXP]
% {
% \@@_change_case_group_lower:nnnn ,
@@ -307,9 +307,11 @@
}
{#1} {#2} {#3} #4 \q_@@_recursion_stop
}
-\cs_new:Npn \@@_change_case_break:w #1 \q_@@_recursion_tail \q_@@_recursion_stop
+\cs_new:Npn \@@_change_case_break:w #1 \q_@@_recursion_stop
+ { \@@_change_case_break_aux:w ? #1 }
+\cs_new:Npn \@@_change_case_break_aux:w #1 \q_@@_recursion_tail
{
- \@@_change_case_store:n {#1}
+ \@@_change_case_store:o { \use_none:n #1 }
\@@_change_case_end:w
}
% \end{macrocode}
diff --git a/l3kernel/testfiles/m3text002.luatex.tlg b/l3kernel/testfiles/m3text002.luatex.tlg
index bcb7da80f..835f6d2f7 100644
--- a/l3kernel/testfiles/m3text002.luatex.tlg
+++ b/l3kernel/testfiles/m3text002.luatex.tlg
@@ -300,7 +300,7 @@ FOO \emph {BAR} {BAZ}
\emph {BAR} {baz}
\emph {BAR} {BAZ}
\emph {BAR} {BAZ}
-\emph {BAR} BAZ
+\emph {BAR} {BAZ}
============================================================
============================================================
TEST 24: Expanding content
diff --git a/l3kernel/testfiles/m3text002.ptex.tlg b/l3kernel/testfiles/m3text002.ptex.tlg
index 67172fd5c..9ec8f2af1 100644
--- a/l3kernel/testfiles/m3text002.ptex.tlg
+++ b/l3kernel/testfiles/m3text002.ptex.tlg
@@ -300,7 +300,7 @@ FOO \emph {BAR} {BAZ}
\emph {BAR} {baz}
\emph {BAR} {BAZ}
\emph {BAR} {BAZ}
-\emph {BAR} BAZ
+\emph {BAR} {BAZ}
============================================================
============================================================
TEST 24: Expanding content
diff --git a/l3kernel/testfiles/m3text002.tlg b/l3kernel/testfiles/m3text002.tlg
index 9fc858202..c62a05ce6 100644
--- a/l3kernel/testfiles/m3text002.tlg
+++ b/l3kernel/testfiles/m3text002.tlg
@@ -300,7 +300,7 @@ FOO \emph {BAR} {BAZ}
\emph {BAR} {baz}
\emph {BAR} {BAZ}
\emph {BAR} {BAZ}
-\emph {BAR} BAZ
+\emph {BAR} {BAZ}
============================================================
============================================================
TEST 24: Expanding content
diff --git a/l3kernel/testfiles/m3text002.uptex.tlg b/l3kernel/testfiles/m3text002.uptex.tlg
index fcade24d7..0b57bf702 100644
--- a/l3kernel/testfiles/m3text002.uptex.tlg
+++ b/l3kernel/testfiles/m3text002.uptex.tlg
@@ -300,7 +300,7 @@ FOO \emph {BAR} {BAZ}
\emph {BAR} {baz}
\emph {BAR} {BAZ}
\emph {BAR} {BAZ}
-\emph {BAR} BAZ
+\emph {BAR} {BAZ}
============================================================
============================================================
TEST 24: Expanding content
diff --git a/l3kernel/testfiles/m3text002.xetex.tlg b/l3kernel/testfiles/m3text002.xetex.tlg
index bcb7da80f..835f6d2f7 100644
--- a/l3kernel/testfiles/m3text002.xetex.tlg
+++ b/l3kernel/testfiles/m3text002.xetex.tlg
@@ -300,7 +300,7 @@ FOO \emph {BAR} {BAZ}
\emph {BAR} {baz}
\emph {BAR} {BAZ}
\emph {BAR} {BAZ}
-\emph {BAR} BAZ
+\emph {BAR} {BAZ}
============================================================
============================================================
TEST 24: Expanding content
More information about the latex3-commits
mailing list.