summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3names.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx13
1 files changed, 9 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index e7b7a0e50a3..0a4fe07d505 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-24}
+% \date{Released 2020-10-05}
%
% \maketitle
%
@@ -1464,12 +1464,17 @@
% Here \enquote{smaller} refers to codepoint order which does not correspond to
% the user expected order for most non-ASCII strings.
% \begin{macrocode}
+local minus_tok = token.new(string.byte'-', 12)
+local zero_tok = token.new(string.byte'0', 12)
+local one_tok = token.new(string.byte'1', 12)
luacmd('tex_strcmp:D', function()
local first = scan_string()
local second = scan_string()
- write(first == second and '0'
- or first < second and '-1'
- or '1')
+ if first < second then
+ put_next(minus_tok, one_tok)
+ else
+ put_next(first == second and zero_tok or one_tok)
+ end
end, 'global')
% \end{macrocode}
% \end{macro}