summaryrefslogtreecommitdiff
path: root/rst_helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'rst_helpers.lua')
-rw-r--r--rst_helpers.lua10
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)