diff options
author | Karl Berry <karl@freefriends.org> | 2017-09-05 17:56:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-09-05 17:56:45 +0000 |
commit | 0ba29ce4e645334229114e3a1d97a89b5ee0eb9a (patch) | |
tree | a44af28023dd0e6b236b8c95bcd9a3b2640569b6 /Build/source/texk/web2c/xetexdir | |
parent | ff1fa94aaa339cb7c5702289206d7f0d44471a7e (diff) |
strip only trailing spaces on input, not tabs et al.
git-svn-id: svn://tug.org/texlive/trunk@45221 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_ext.c | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index b6bcfb6859f..d937561b22b 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,12 @@ +2017-09-05 Karl Berry <karl@tug.org> + and Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * xetexdir/XeTeX_ext.c (IS_SPC_OR_EOL): new macro. + (input_line): use it, instead of ISBLANK. + See also analogous change in lib/texmfmp.c. + Original bug report from Evan Aad, + http://tug.org/pipermail/tex-k/2017-August/002801.html + 2017-08-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * pdfimage.cpp: Support /Rotate in PDF image inclusion with diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c index a5ba2e40a46..533423bf052 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c @@ -466,8 +466,9 @@ static uint32_t *utf32Buf = NULL; if (last >= maxbufstack) maxbufstack = last; - /* Trim trailing whitespace. */ - while (last > first && ISBLANK(buffer[last - 1])) + /* Trim trailing space or EOL characters. */ +#define IS_SPC_OR_EOL(c) ((c) == ' ' || (c) == '\r' || (c) == '\n') + while (last > first && IS_SPC_OR_EOL(buffer[last - 1])) --last; return true; |