[latex3-commits] [git/LaTeX3-latex3-latex3] master: Add a sanity check for message wrapping (cd5bf88)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Oct 24 21:37:00 CEST 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/cd5bf882137645555cd40bc28cd8a6a9167bc6bd
>---------------------------------------------------------------
commit cd5bf882137645555cd40bc28cd8a6a9167bc6bd
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Oct 24 20:37:00 2018 +0100
Add a sanity check for message wrapping
See https://tex.stackexchange.com/q/456558
>---------------------------------------------------------------
cd5bf882137645555cd40bc28cd8a6a9167bc6bd
l3kernel/l3file.dtx | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index fcbe47e..37271b0 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -1500,6 +1500,15 @@
\int_set:Nn \l_@@_line_target_int
{ \l_iow_line_count_int - \str_count:N \l_@@_newline_tl + 1 }
% \end{macrocode}
+% Sanity check.
+% \begin{macrocode}
+ \int_compare:nNnT { \l_@@_line_target_int } < 0
+ {
+ \tl_set:Nn \l_@@_newline_tl { \iow_newline: }
+ \int_set:Nn \l_@@_line_target_int
+ { \l_iow_line_count_int + 1 }
+ }
+% \end{macrocode}
% There is then a loop over the input, which stores the wrapped
% result in \cs{l_@@_wrap_tl}. After the loop, the resulting text is
% passed on to the function which has been given as a post-processor.
More information about the latex3-commits
mailing list