summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/spac-lin.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/spac-lin.mkiv')
-rw-r--r--tex/context/base/mkiv/spac-lin.mkiv19
1 files changed, 13 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/spac-lin.mkiv b/tex/context/base/mkiv/spac-lin.mkiv
index c4c6eb6d9..6558cb111 100644
--- a/tex/context/base/mkiv/spac-lin.mkiv
+++ b/tex/context/base/mkiv/spac-lin.mkiv
@@ -61,7 +61,7 @@
\appendtoks
\setuevalue{\e!start\currentlines}{\spac_lines_start[\currentlines]}%
- \setuevalue{\e!stop \currentlines}{\spac_lines_stop}%
+ \letvalue {\e!stop \currentlines }\spac_lines_stop
\to \everydefinelines
\unexpanded\def\spac_lines_start[#1]%
@@ -107,14 +107,17 @@
\def\spac_lines_after_first_obeyed_line_a % tzt two pass, like itemize
{\linesparameter\c!command
+ \linesparameter\c!left
\glet\spac_after_first_obeyed_line\spac_lines_after_first_obeyed_line_b}
\def\spac_lines_after_first_obeyed_line_b
{\spac_lines_break
- \linesparameter\c!command}
+ \linesparameter\c!command
+ \linesparameter\c!left}
\def\spac_lines_obeyed_line
- {\dostoptagged
+ {\ifdone\linesparameter\c!right\fi
+ \dostoptagged % can be a dummy one as we don't look ahead
\par
\dostarttagged\t!line\empty
\futurelet\next\spac_lines_between}
@@ -128,9 +131,13 @@
\egroup}
\def\spac_lines_between
- {\doifelsemeaning\next\obeyedline % brrr
- {\linesparameter\c!inbetween}
- {\spac_after_first_obeyed_line}}
+ {\ifx\next\spac_lines_stop
+ \donefalse
+ \else
+ \doifelsemeaning\next\obeyedline % brrr
+ {\donefalse\linesparameter\c!inbetween}
+ {\donetrue\spac_after_first_obeyed_line}%
+ \fi}
\definelines[\v!lines]