Commits

Philipp Gesang committed 5fc085d

escape {braces,brackets} in further markup elements

Comments (0)

Files changed (1)

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

                 ,
 
     emphasis        = (V"asterisk" - V"double_asterisk")
-                    * Cs((1 - V"spacing" - V"eol" - V"asterisk")
-                       * ((1 - (1 * V"asterisk"))^0
-                        * (1 - V"spacing" - V"eol" - V"asterisk"))^-1)
+                    * Cs((V"normal_char" - V"spacing" - V"eol" - V"asterisk")
+                       * ((V"normal_char" - (V"normal_char" * V"asterisk"))^0
+                        * (V"normal_char" - V"spacing" - V"eol" - V"asterisk"))^-1)
                     * V"asterisk"
                     / rst_context.emphasis,
 
     strong_emphasis = V"double_asterisk"
-                    * Cs((1 - V"spacing" - V"eol" - V"asterisk")
-                       * ((1 - (1 * V"double_asterisk"))^0
-                        * (1 - V"spacing" - V"eol" - V"asterisk"))^-1)
+                    * Cs((V"normal_char" - V"spacing" - V"eol" - V"asterisk")
+                       * ((V"normal_char" - (V"normal_char" * V"double_asterisk"))^0
+                        * (V"normal_char" - V"spacing" - V"eol" - V"asterisk"))^-1)
                     * V"double_asterisk"
                     / rst_context.strong_emphasis,
 
     inline_literal  = V"double_bareia"
                     * C ((V"escaped_bareia" - V"spacing" - V"eol" - V"bareia")
-                       * ((V"escaped_bareia" - (1 * V"double_bareia"))^0
+                       * ((V"escaped_bareia" - (V"normal_char" * V"double_bareia"))^0
                         * (V"escaped_bareia" - V"spacing" - V"eol" - V"bareia"))^-1)
                     * V"double_bareia"
                     / rst_context.literal,
 
-    interpreted_single_char = (1 - V"spacing" - V"eol" - V"bareia") * #V"bareia",
-    interpreted_multi_char  = (1 - V"spacing" - V"eol" - V"bareia") * (1 - (1 * V"bareia"))^0 * (1 - V"spacing" - V"eol" - V"bareia"),
+    interpreted_single_char = (V"normal_char" - V"spacing" - V"eol" - V"bareia") * #V"bareia",
+    interpreted_multi_char  = (V"normal_char" - V"spacing" - V"eol" - V"bareia") * (V"normal_char" - (1 * V"bareia"))^0 * (1 - V"spacing" - V"eol" - V"bareia"),
 
     interpreted_text = C(V"role_marker"^-1)
                      * (V"bareia" - V"double_bareia")