diff options
Diffstat (limited to 'rst_parser.lua')
-rw-r--r-- | rst_parser.lua | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/rst_parser.lua b/rst_parser.lua index cd44f51..7d604aa 100644 --- a/rst_parser.lua +++ b/rst_parser.lua @@ -144,7 +144,7 @@ local parser = P{ explicit_markup_start = V"double_dot" * V"whitespace", explicit_markup = V"footnote_block" - --+ V"directive" + + V"directive_block" + V"substitution_definition" , @@ -153,6 +153,28 @@ local parser = P{ , -------------------------------------------------------------------------------- +-- Directives block +-------------------------------------------------------------------------------- + + directive_block = V"directive" + --* (V"blank_line"^-1 * V"directive")^0 + * V"end_block" + , + + directive = V"explicit_markup_start" + * C((V"escaped_colon" + (1 - V"colon" - V"eol"))^1) + * V"double_colon" + * (V"directive_block_multi" + V"directive_block_single") + / rst.directive + , + + directive_block_multi = C((1 - V"eol")^0) * V"eol" + * V"directive_indented_lines" + , + + directive_block_single = C((1 - V"eol")^1) * V"eol", + +-------------------------------------------------------------------------------- -- Substitution definition block -------------------------------------------------------------------------------- |