1. Philipp Gesang
  2. context-rst

Commits

Philipp Gesang  committed b976050

fix premature escaping of brackets

  • Participants
  • Parent commits 995a0b1
  • Branches default

Comments (0)

Files changed (1)

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

View file
                      + V"bareia"
                      + V"asterisk"
                      + V"bar"
-                     + V"lsquare" + V"rsquare"
+                     + V"lbrack" + V"rbrack"
                      ,        -- inline markup
     asterisk = P"*",
     quote_single = P"'",
 
     lparenthesis = P"(",
     rparenthesis = P")",
-    lsquare = P"[" / [[{\\string[}]],
-    rsquare = P"]" / [[{\\string]}]],
+    lbrack  = P"[",
+    rbrack  = P"]",
     lbrace  = P"{" / [[{\\letterleftbrace}]],
     rbrace  = P"}" / [[{\\letterrightbrace}]],
     less    = P"<",
     greater = P">",
-    leftpar  = V"lparenthesis" + V"lsquare" + V"lbrace" + V"less",
-    rightpar = V"rparenthesis" + V"rsquare" + V"rbrace" + V"greater",
+    leftpar  = V"lparenthesis" + V"lbrack" + V"lbrace" + V"less",
+    rightpar = V"rparenthesis" + V"rbrack" + V"rbrace" + V"greater",
 
-    normal_char = V"lbrace" + V"rbrace" + V"lsquare" + V"rsquare" -- escape those if in input
+    normal_char = V"lbrace" + V"rbrace" + V"lbrack" + V"rbrack" -- escape those if in input
                 + 1
                 ,
 
                      * V"bareia" * V"underscore"
                      ,
 
-    footnote_reference = V"lsquare"
+    footnote_reference = V"lbrack"
                        * Cs(V"footnote_label" + V"citation_reference_label")
-                       * V"rsquare"
+                       * V"rbrack"
                        * V"underscore"
                        / rst_context.footnote_reference
                        ,
                    + V"asterisk"
                    ,
 
-    citation_reference_label = V"letter" * (1 - V"rsquare")^1,
+    citation_reference_label = V"letter" * (1 - V"rbrack")^1,
 
     inline_internal_target = V"underscore"
                            * V"bareia"