diff options
Diffstat (limited to 'rst_parser.lua')
-rw-r--r-- | rst_parser.lua | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/rst_parser.lua b/rst_parser.lua index 7d604aa..7162597 100644 --- a/rst_parser.lua +++ b/rst_parser.lua @@ -149,7 +149,6 @@ local parser = P{ , explicit_markup_block = V"explicit_markup"^1 - * V"end_block" , -------------------------------------------------------------------------------- @@ -162,7 +161,7 @@ local parser = P{ , directive = V"explicit_markup_start" - * C((V"escaped_colon" + (1 - V"colon" - V"eol"))^1) + * C(((V"escaped_colon" + (1 - V"colon" - V"eol")) - V"substitution_text")^1) * V"double_colon" * (V"directive_block_multi" + V"directive_block_single") / rst.directive @@ -179,16 +178,20 @@ local parser = P{ -------------------------------------------------------------------------------- substitution_definition = V"explicit_markup_start" - * V"bar" - * C((1 - V"bar" - V"eol")^1) -- substitution text - * V"bar" + * V"substitution_text" * V"whitespace" * C((1 - V"colon" - V"space" - V"eol")^1) -- directive * V"double_colon" * Ct(V"data_directive_block") + * V"end_block"^-1 / rst.substitution_definition , + substitution_text = V"bar" + * C((1 - V"bar" - V"eol")^1) + * V"bar" + , + data_directive_block = V"data_directive_block_long" + V"data_directive_block_short" , @@ -1081,7 +1084,8 @@ local parser = P{ par_other = V"par_matchindent" * C((1 - V"literal_block_shorthand" - V"eol")^1) - * (V"included_literal_block" + V"eol"), + * (V"included_literal_block" + V"eol") + , par_setindent = Cmt(V"space"^0, function (s, i, indent) warn("par-i", #indent, "", "", i) |