diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv index e683c3766c9..2c28acf7290 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv @@ -25,7 +25,7 @@ \unprotect -\definesystemvariable {sh} % ShapedText .. todo: commandhandler +\ifdefined\??sh \else \definesystemvariable {sh} \fi % ShapedText .. todo: commandhandler \unexpanded\def\setupshapetexts {\dodoubleempty\getparameters[\??sh]} @@ -80,16 +80,17 @@ \unexpanded\def\adaptparshape {\def\docommand##1% - {\ifcase\scratchcounter - \expandafter\appendtoks\space##1 \to\scratchtoks - \else - \advance\scratchcounter\minusone - \fi}% + {\doifsomething{##1}% + {\ifcase\scratchcounter\relax + \expandafter\appendtoks\space##1 \to\scratchtoks + \else + \advance\scratchcounter\minusone + \fi}}% \scratchcounter\prevgraf \doglobal\decrement(\totalparlines,\scratchcounter)% \multiply\scratchcounter\plustwo \scratchtoks\emptytoks - \expanded{\processseparatedlist[\the\partoks][\space]}\docommand + \expanded{\processseparatedlist[\the\partoks][\space]}\docommand % we can have two spaces \global\partoks\scratchtoks \parshape\totalparlines\the\partoks\relax} |