diff options
author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-22 23:56:16 +0200 |
---|---|---|
committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-22 23:56:16 +0200 |
commit | 678cfc0650d01258fc594d995480e41623efc496 (patch) | |
tree | 3a87aed2d995c7ff000f4f0a795160f638ab6bb5 /rst_helpers.lua | |
parent | ec7dbffb15a99faa6c366a049ed3fdf919a51aaf (diff) | |
download | context-rst-678cfc0650d01258fc594d995480e41623efc496.tar.gz |
selected text roles, including colors
Diffstat (limited to 'rst_helpers.lua')
-rw-r--r-- | rst_helpers.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rst_helpers.lua b/rst_helpers.lua index ade8b23..869b4d9 100644 --- a/rst_helpers.lua +++ b/rst_helpers.lua @@ -97,6 +97,16 @@ do 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) + + -- color expression matching for text roles + local digit = R"09" + local dot = P"." + local colvalue = digit * dot * digit^1 + + digit + + dot * digit^1 + local coldelim = P"_" + P"-" + p.rgbvalues = P"rgb_" + * Ct( C(colvalue) * coldelim * C(colvalue) * coldelim * C(colvalue) ) end function helpers.cell.create(raw, n_row, n_col, parent, variant) |