Commits

Philipp Gesang committed aa4a752

allow multi-line directive blocks with blanks

  • Participants
  • Parent commits 55c97cf

Comments (0)

Files changed (2)

mod/tex/context/third/rst/rst_directives.lua

   \csname %s\endcsname%%
 \else
   \relax
-\fi%%
+\fi
 {%s}%%
 ]], name, name, content)
 end

mod/tex/context/third/rst/rst_parser.lua

                     ,
 
     directive = V"explicit_markup_start"
-              * C(((V"escaped_colon" + (1 - V"colon" - V"eol")) - V"substitution_text")^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
               ,
 
-    directive_block_multi = C((1 - V"eol")^0) * V"eol"
+    directive_block_multi = C((1 - V"eol")^0) -- name
+                          * V"eol"
+                          * V"blank_line"^-1 -- how many empty lines are permitted?
                           * V"directive_indented_lines"
                           ,
 
 
     directive_indented_lines = V"directive_indented_first"
                              * V"directive_indented_other"^0
+                             * (V"blank_line"^1 * V"directive_indented_other"^1)^1
                              ,