From d458b650b0a27726e59dbff6b8dbbb767d3ee802 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 2 Apr 2019 21:10:25 +0000 Subject: context-handlecsv (2apr19) git-svn-id: svn://tug.org/texlive/trunk@50709 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/context/third/handlecsv/VERSION | 2 +- .../texmf-dist/tex/context/third/handlecsv/t-handlecsv.lua | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Master/texmf-dist/doc/context/third/handlecsv/VERSION b/Master/texmf-dist/doc/context/third/handlecsv/VERSION index a382d85c6d9..0aa983b950f 100644 --- a/Master/texmf-dist/doc/context/third/handlecsv/VERSION +++ b/Master/texmf-dist/doc/context/third/handlecsv/VERSION @@ -1 +1 @@ -2018.09.24 +2019.03.30 diff --git a/Master/texmf-dist/tex/context/third/handlecsv/t-handlecsv.lua b/Master/texmf-dist/tex/context/third/handlecsv/t-handlecsv.lua index c34dc26d975..16ba045aa26 100644 --- a/Master/texmf-dist/tex/context/third/handlecsv/t-handlecsv.lua +++ b/Master/texmf-dist/tex/context/third/handlecsv/t-handlecsv.lua @@ -1,6 +1,6 @@ -- %D \module -- %D [ file=t-handlecsv.lua, --- %D version=2018.09.24, +-- %D version=2019.03.30, -- %D title=HandleCSV module, -- %D subtitle=CSV file handling, -- %D author=Jaroslav Hajtmar, @@ -9,7 +9,7 @@ -- %D email=hajtmar@gyza.cz, -- %D license=GNU General Public License] -- --- %C Copyright (C) 2018 Jaroslav Hajtmar +-- %C Copyright (C) 2019 Jaroslav Hajtmar -- %C -- %C This program is free software: you can redistribute it and/or modify -- %C it under the terms of the GNU General Public License as published by @@ -1194,9 +1194,9 @@ local string2print=[[% \edef\thirdparam{#3}% \def\fourthparam{#4}% \edef\paroperator{#2}% -% operator '==' is for strings comparing converted to 'eq' operator + % operator '==' is for strings comparing converted to 'eq' operator; a blank space before the percent sign is strictly required!!! \ctxlua{if '#2'=="==" and not(type(tonumber('#1'))=='number' and type(tonumber('#3'))=='number') then context('\\def\\paroperator{eq}') end}% -% operator '~=' is for strings comparing converted to 'neq' operator + % operator '~=' is for strings comparing converted to 'neq' operator; a blank space before the percent sign is strictly required !!! \ctxlua{if '#2'=="~=" and not(type(tonumber('#1'))=='number' and type(tonumber('#3'))=='number') then context('\\def\\paroperator{neq}') end}% }% @@ -1263,6 +1263,7 @@ local string2print=[[% \def\doloopif#1#2#3#4{% \edef\tempnumline{\numline}% 23.6.2017 \readandprocessparameters{#1}{#2}{#3}{#4}% + \removeunwantedspaces% 25.3.2019 % \resetnumline % 22.6.2017 \bfilehook% % and now process actual operator @@ -1303,11 +1304,12 @@ local string2print=[[% \doloop{\ctxlua{if '#1'=='#3' then context('\\exitloop') else context('\\ifEOF\\exitloop\\else\\blinehook\\fourthparam\\elinehook\\nextrow\\fi') end}}% },% end until % the comma , is very important here!!! whiledo=>{% {substring}{untilneq}{string} ... % Repeat action when the condition is met. When the condition is not met for the first line, the action will NOT BE performed! - \doloop{\ctxlua{if '#1'~='#3' then context('\\exitloop') else context('\\blinehook\\fourthparam\\elinehook\\ifEOF\\exitloop\\else\\nextrow\\fi') end}}% + \doloop{\ctxlua{if '#1'~='#3' then context('\\exitloop') else context('\\removeunwantedspaces\\blinehook\\fourthparam\\elinehook\\ifEOF\\exitloop\\else\\nextrow\\fi') end}}% },% end untilneq % the comma , is very important here!!! ]% end of \processaction% \efilehook% \setnumline{\tempnumline}% + \removeunwantedspaces% 30.3.2019 } % end of \doloopif -- cgit v1.2.3