On Tue, 14 Aug 2018, Rik Kabel wrote:
I really think, though, that a buffers.strip function would be the way to go, instead of futzing after the damage is done.
In lua, buffers.getcontent('name') gives the contents of the buffer labelled 'name'. You can post-process this in whatever way you want. For example, you could write a lua function userdata.strip that strips the leading and ending black spaces from a string, and then call
context(userdata.strip(buffers.getcontent('name))) Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________