Add \pm, \div
Reviewers: xymostech Reviewed By: xymostech Differential Revision: http://phabricator.benalpert.com/D36
This commit is contained in:
parent
29949b500a
commit
97dc1bf1da
12
MJLite.js
12
MJLite.js
|
@ -62,11 +62,13 @@ var MJLite = (function() {
|
|||
};
|
||||
|
||||
var charLookup = {
|
||||
'*': '\u2217',
|
||||
'-': '\u2212',
|
||||
'cdot': '\u22C5',
|
||||
'lvert': '|',
|
||||
'rvert': '|'
|
||||
"*": "\u2217",
|
||||
"-": "\u2212",
|
||||
"cdot": "\u22C5",
|
||||
"lvert": "|",
|
||||
"rvert": "|",
|
||||
"pm": "\u00b1",
|
||||
"div": "\u00f7"
|
||||
};
|
||||
|
||||
var textit = function(value) {
|
||||
|
|
|
@ -9,6 +9,8 @@ cdot return 'CDOT'
|
|||
frac return 'FRAC'
|
||||
lvert return 'LVERT'
|
||||
rvert return 'RVERT'
|
||||
pm return 'PM'
|
||||
div return 'DIV'
|
||||
[/|a-zA-Z0-9] return 'ORD'
|
||||
[*+-] return 'BIN'
|
||||
\^ return '^'
|
||||
|
@ -66,6 +68,10 @@ group
|
|||
func
|
||||
: 'CDOT'
|
||||
{$$ = [{type: 'bin', value: yytext}];}
|
||||
| 'PM'
|
||||
{$$ = [{type: 'bin', value: yytext}];}
|
||||
| 'DIV'
|
||||
{$$ = [{type: 'bin', value: yytext}];}
|
||||
| 'FRAC' group group
|
||||
{$$ = [{type: 'frac', value: {numer: $2, denom: $3}}];}
|
||||
| 'LVERT'
|
||||
|
|
Loading…
Reference in New Issue
Block a user