diff options
author | Philipp Gesang <gesang@stud.uni-heidelberg.de> | 2012-06-05 21:21:30 +0200 |
---|---|---|
committer | Philipp Gesang <gesang@stud.uni-heidelberg.de> | 2012-06-05 21:21:30 +0200 |
commit | 92edc56478208b7cf9e728becaccf6e87a4f589b (patch) | |
tree | a9846061d71b51d77dfd7399737decd309b57376 /mod | |
parent | 5d96fd5b382aad74ec262b9d18719d8b31e215d9 (diff) | |
download | context-rst-92edc56478208b7cf9e728becaccf6e87a4f589b.tar.gz |
compensate for buffers leaving spaces
Diffstat (limited to 'mod')
-rw-r--r-- | mod/tex/context/third/rst/rst_directives.lua | 13 |
1 files changed, 8 insertions, 5 deletions
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), <megas.kapaneus@gmail.com> --- 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 |