From 92edc56478208b7cf9e728becaccf6e87a4f589b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 5 Jun 2012 21:21:30 +0200 Subject: compensate for buffers leaving spaces --- mod/tex/context/third/rst/rst_directives.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'mod/tex/context') diff --git a/mod/tex/context/third/rst/rst_directives.lua b/mod/tex/context/third/rst/rst_directives.lua index 96eaf59..8ee0582 100644 --- a/mod/tex/context/third/rst/rst_directives.lua +++ b/mod/tex/context/third/rst/rst_directives.lua @@ -4,7 +4,7 @@ -- USAGE: called by rst_parser.lua -- DESCRIPTION: Complement to the reStructuredText parser -- AUTHOR: Philipp Gesang (Phg), --- CHANGED: 2011-08-28 13:47:00+0200 +-- CHANGED: 2012-06-05 21:18:54+0200 -------------------------------------------------------------------------------- -- @@ -226,13 +226,16 @@ rst_directives.mp = function(name, data) return mpcode end +--- There’s an issue with buffers leaving trailing spaces due to their +--- implementation. +--- http://archive.contextgarden.net/message/20111108.175913.1d994624.en.html rst_directives.ctx = function(name, data) local ctx = fmt([[ -\startbuffer[%s] +\startbuffer[%s]%% %s\stopbuffer \def\RSTsubstitution%s{%% - \getbuffer[%s]%% + \getbuffer[%s]\removeunwantedspaces%% } ]], name, data, name, name) return ctx @@ -241,13 +244,13 @@ end rst_directives.lua = function(name, data) local luacode = fmt([[ -\startbuffer[%s] +\startbuffer[%s]%% \startluacode %s \stopluacode \stopbuffer \def\RSTsubstitution%s{%% - \getbuffer[%s]%% + \getbuffer[%s]\removeunwantedspaces%% } ]], name, data, name, name) return luacode -- cgit v1.2.3