From: Jens Frank Date: Sun, 13 Mar 2005 15:37:09 +0000 (+0000) Subject: BUG 1594 Render a hyphen in a formula as − in HTML X-Git-Tag: 1.5.0alpha1~624 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=e71def307db83f541045a987d69d73e4e74e970e;p=lhc%2Fweb%2Fwiklou.git BUG 1594 Render a hyphen in a formula as − in HTML Better patch than the first try. Allows A-B to be rendered as MathML or as HTML --- diff --git a/math/lexer.mll b/math/lexer.mll index a08677c5a9..e5bb1ddfba 100644 --- a/math/lexer.mll +++ b/math/lexer.mll @@ -47,7 +47,7 @@ rule token = parse | 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 (HTMLABLEC (FONT_UFH, str,str)) } - | "-" { LITERAL (HTMLABLE (FONT_UFH,"-"," − "))} + | "-" { 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)) } | delimiter_uf_op { let str = Lexing.lexeme lexbuf in DELIMITER (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) } | "\\" alpha + { Texutil.find (Lexing.lexeme lexbuf) }