Re: [NTG-context] Trimming strings and Lua string.trim question

2014-03-06 Thread Wolfgang Schuster
Am 06.03.2014 um 16:04 schrieb Rik Kabel : > Could you please ensure that this handles text in buffers the same way that > it handles other strings? I noticed that this is handled a bit differently, > as the following shows,but perhaps it is my clumsy coding. The buffer result > is closer to w

Re: [NTG-context] Trimming strings and Lua string.trim question

2014-03-06 Thread Rik Kabel
On 2014-03-06 05:38, Hans Hagen wrote: On 3/6/2014 12:00 AM, Rik Kabel wrote: On 2014-03-05 10:54, Wolfgang Schuster wrote: Am 05.03.2014 um 16:18 schrieb Wolfgang Schuster mailto:schuster.wolfg...@gmail.com>>: Am 05.03.2014 um 16:07 schrieb Rik Kabel mailto:cont...@rik.users.panix.com>>:

Re: [NTG-context] Trimming strings and Lua string.trim question

2014-03-06 Thread Hans Hagen
On 3/6/2014 12:00 AM, Rik Kabel wrote: On 2014-03-05 10:54, Wolfgang Schuster wrote: Am 05.03.2014 um 16:18 schrieb Wolfgang Schuster mailto:schuster.wolfg...@gmail.com>>: Am 05.03.2014 um 16:07 schrieb Rik Kabel mailto:cont...@rik.users.panix.com>>: striplong It would be nice if stripl

Re: [NTG-context] Trimming strings and Lua string.trim question

2014-03-05 Thread Rik Kabel
On 2014-03-05 10:54, Wolfgang Schuster wrote: Am 05.03.2014 um 16:18 schrieb Wolfgang Schuster mailto:schuster.wolfg...@gmail.com>>: Am 05.03.2014 um 16:07 schrieb Rik Kabel >: striplong It would be nice if striplong worked, but the example fails wh

Re: [NTG-context] Trimming strings and Lua string.trim question

2014-03-05 Thread Rik Kabel
On 2014-03-05 10:18, Wolfgang Schuster wrote: Am 05.03.2014 um 16:07 schrieb Rik Kabel >: striplong It would be nice if striplong worked, but the example fails when string.striplong is used in place of string.strip. The log says: ! LuaTeX error [s

Re: [NTG-context] Trimming strings and Lua string.trim question

2014-03-05 Thread Wolfgang Schuster
Am 05.03.2014 um 16:18 schrieb Wolfgang Schuster : > > Am 05.03.2014 um 16:07 schrieb Rik Kabel : > >>> striplong >>> >> >> It would be nice if striplong worked, but the example fails when >> string.striplong is used in place of string.strip. The log says: >> >> ! LuaTeX error [string "\di

Re: [NTG-context] Trimming strings and Lua string.trim question

2014-03-05 Thread Wolfgang Schuster
Am 05.03.2014 um 16:07 schrieb Rik Kabel : >> striplong >> > > It would be nice if striplong worked, but the example fails when > string.striplong is used in place of string.strip. The log says: > > ! LuaTeX error [string "\directlua "]:1: attempt to call field 'striplong' (a > nil value) >

Re: [NTG-context] Trimming strings and Lua string.trim question

2014-03-05 Thread Rik Kabel
On 2014-03-05 03:24, Hans Hagen wrote: On 3/5/2014 5:45 AM, Rik Kabel wrote: I am trying to strip all leading and trailing whitespace from a string. I have tried two methods, neither of which is satisfactory. The first method uses \ignorespaces and \removeunwantedspaces. This fails to strip lea

Re: [NTG-context] Trimming strings and Lua string.trim question

2014-03-05 Thread Hans Hagen
On 3/5/2014 5:45 AM, Rik Kabel wrote: I am trying to strip all leading and trailing whitespace from a string. I have tried two methods, neither of which is satisfactory. The first method uses \ignorespaces and \removeunwantedspaces. This fails to strip leading and trailing newlines. The second

[NTG-context] Trimming strings and Lua string.trim question

2014-03-04 Thread Rik Kabel
I am trying to strip all leading and trailing whitespace from a string. I have tried two methods, neither of which is satisfactory. The first method uses \ignorespaces and \removeunwantedspaces. This fails to strip leading and trailing newlines. The second method uses the Lua string.strip fun