From 678cfc0650d01258fc594d995480e41623efc496 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 22 Sep 2010 23:56:16 +0200 Subject: selected text roles, including colors --- rst_helpers.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'rst_helpers.lua') 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) -- cgit v1.2.3