diff options
author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-18 10:48:15 +0200 |
---|---|---|
committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-18 10:48:15 +0200 |
commit | 7358c6bd092cf39fee1e73420aa7f9687c8833dd (patch) | |
tree | ee3111ff4ced63e225355a8305b4540e5addc0fb /rst_helpers.lua | |
parent | 01d0c2dcca48fde5a99ff1173e80ad3c085cdbb5 (diff) | |
download | context-rst-7358c6bd092cf39fee1e73420aa7f9687c8833dd.tar.gz |
support for key-val extended image directives (only “width” for now).
Diffstat (limited to 'rst_helpers.lua')
-rw-r--r-- | rst_helpers.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rst_helpers.lua b/rst_helpers.lua index b8902ca..33c1a80 100644 --- a/rst_helpers.lua +++ b/rst_helpers.lua @@ -90,6 +90,13 @@ do p.whitespace = S" \t\v\r\n"^1 p.strip = p.whitespace^0 * C((1 - (p.whitespace * p.last))^1) * p.whitespace^0 * p.last + + + local colon = P":" + local escaped_colon = P"\\:" + local nocolon = (escaped_colon + (1 - colon))^1 + p.colon_right = nocolon * colon + p.colon_keyval = C(nocolon) * colon * p.space^1 * C((1 - (p.space^0 * P(-1)))^1) end function helpers.cell.create(raw, n_row, n_col, parent, variant) |