http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88260
Revision: 88260
Author: thenub314
Date: 2011-05-16 19:25:46 +0000 (Mon, 16 May 2011)
Log Message:
-----------
The following change fixes minor issues with the MathML display of
arithmetic operations. In particular in displaying x-2 it should use
the entity − in MathML as well. Also changed spacing so an
opporation such as "+" would render as <mo> + </mo> instead of
<mo>+</mo>.
Modified Paths:
--------------
trunk/extensions/Math/math/lexer.mll
Modified: trunk/extensions/Math/math/lexer.mll
===================================================================
--- trunk/extensions/Math/math/lexer.mll 2011-05-16 19:23:21 UTC (rev
88259)
+++ trunk/extensions/Math/math/lexer.mll 2011-05-16 19:25:46 UTC (rev
88260)
@@ -53,8 +53,8 @@
| literal_mn { let str = Lexing.lexeme lexbuf in LITERAL
(MHTMLABLEC (FONT_RM, str,str,MN,str)) }
| literal_uf_lt { let str = Lexing.lexeme lexbuf in LITERAL
(HTMLABLEC (FONT_UFH, str,str)) }
| delimiter_uf_lt { let str = Lexing.lexeme lexbuf in DELIMITER
(MHTMLABLEC (FONT_UFH, str,str,MO,str)) }
- | "-" { let str = Lexing.lexeme lexbuf in
LITERAL (MHTMLABLEC (FONT_UFH,"-"," − ",MO,str))}
- | literal_uf_op { let str = Lexing.lexeme lexbuf in LITERAL
(MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) }
+ | "-" { let str = Lexing.lexeme lexbuf in
LITERAL (MHTMLABLEC (FONT_UFH,"-"," − ",MO," − "))}
+ | literal_uf_op { let str = Lexing.lexeme lexbuf in LITERAL
(MHTMLABLEC (FONT_UFH, str," "^str^" ",MO," "^str^" ")) }
| delimiter_uf_op { let str = Lexing.lexeme lexbuf in DELIMITER
(MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) }
| "\\sqrt" space * "[" { FUN_AR1opt "\\sqrt" }
| "\\xleftarrow" space * "[" { Texutil.tex_use_ams(); FUN_AR1opt
"\\xleftarrow" }
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs