diff options
Diffstat (limited to 'mod/tex/context/third/rst/rst_directives.lua')
-rw-r--r-- | mod/tex/context/third/rst/rst_directives.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/tex/context/third/rst/rst_directives.lua b/mod/tex/context/third/rst/rst_directives.lua index d1be13b..b64bafc 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), <phg42.2a@gmail.com> --- CHANGED: 2013-03-26 22:45:45+0100 +-- CHANGED: 2013-06-03 18:52:35+0200 -------------------------------------------------------------------------------- -- @@ -73,19 +73,22 @@ local function img_setup (properties) end rst_directives.image = function(data) + rst_context.addsetups "image" local inline_parser = rst_context.inline_parser local properties = {} local anon = false local rdi = rst_directives.images local hp = helpers.patterns local caption = "" - local name + local name = "" if data.name then name = stringstrip(data.name) data.name = nil else - name = data[1] + if next(data[1]) then + name = data[1][1] + end end --rd.anonymous = rd.anonymous + 1 |