r97018 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97017‎ | r97018 | r97019 >
Date:22:24, 13 September 2011
Author:brion
Status:ok
Tags:
Comment:
* (bug 19547): Apostrophe / single quotes in math \text{...}

Reapplied r87092 (tests added, tweaked for merge, no functional diff) to allow "'" and "`" in \text{...} bits.
I'm not convinced this is a sufficient fix -- there are probably a *lot* more where this came from.
But it doesn't hurt to add them!
Modified paths:
  • /trunk/extensions/Math/math/lexer.mll (modified) (history)
  • /trunk/extensions/Math/mathParserTests.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/Math/mathParserTests.txt
@@ -85,3 +85,16 @@
8686 <img class="tex" alt="\Stigma\stigma\varstigma" src="/images/math/7/b/9/7b9233276816994a33a5e968202cef6e.png" />
8787 </p>
8888 !! end
 89+
 90+!! test
 91+BUG 19547: Apostrophe / single quotes in math \text{...}
 92+!! input
 93+<math>\text{next years}</math>
 94+<math>\text{next year's}</math>
 95+<math>\text{`next' year}</math>
 96+!! result
 97+<p><span class="texhtml" dir="ltr">next years</span>
 98+<span class="texhtml" dir="ltr">next year's</span>
 99+<span class="texhtml" dir="ltr">`next' year</span>
 100+</p>
 101+!! end
Index: trunk/extensions/Math/math/lexer.mll
@@ -11,8 +11,8 @@
1212 let delimiter_uf_lt = ['(' ')' '.']
1313 let literal_uf_op = ['+' '-' '*' '=']
1414 let delimiter_uf_op = ['/' '|']
15 -let boxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' ' ' '\128'-'\255']
16 -let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' ' ']
 15+let boxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' '\'' '`' ' ' '\128'-'\255']
 16+let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' '\'' '`' ' ']
1717
1818 rule token = parse
1919 space + { token lexbuf }

Follow-up revisions

RevisionCommit summaryAuthorDate
r97259REL1_18 MFT r97001, r97002, r97007, r97014, r97018, r97034reedy13:06, 16 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87092The following fixes bug 19547 by allowing left and right single...thenub31418:23, 28 April 2011

Status & tagging log