Make the linter happy
Auditors: alpert
This commit is contained in:
parent
fa101db4e1
commit
79a50b3abe
24
Lexer.js
24
Lexer.js
|
@ -14,18 +14,18 @@ function LexResult(type, text, position) {
|
|||
|
||||
// "normal" types of tokens
|
||||
var normals = [
|
||||
[/^[/|@."`0-9]/, 'textord'],
|
||||
[/^[a-zA-Z]/, 'mathord'],
|
||||
[/^[*+-]/, 'bin'],
|
||||
[/^[=<>]/, 'rel'],
|
||||
[/^[,;]/, 'punct'],
|
||||
[/^[/|@."`0-9]/, "textord"],
|
||||
[/^[a-zA-Z]/, "mathord"],
|
||||
[/^[*+-]/, "bin"],
|
||||
[/^[=<>]/, "rel"],
|
||||
[/^[,;]/, "punct"],
|
||||
[/^'/, "'"],
|
||||
[/^\^/, '^'],
|
||||
[/^_/, '_'],
|
||||
[/^{/, '{'],
|
||||
[/^}/, '}'],
|
||||
[/^[(\[]/, 'open'],
|
||||
[/^[)\]?!]/, 'close']
|
||||
[/^\^/, "^"],
|
||||
[/^_/, "_"],
|
||||
[/^{/, "{"],
|
||||
[/^}/, "}"],
|
||||
[/^[(\[]/, "open"],
|
||||
[/^[)\]?!]/, "close"]
|
||||
];
|
||||
|
||||
// Build a regex to easily parse the functions
|
||||
|
@ -42,7 +42,7 @@ Lexer.prototype.lex = function(pos) {
|
|||
|
||||
// If there's no more input to parse, return an EOF token
|
||||
if (input.length === 0) {
|
||||
return new LexResult('EOF', null, pos);
|
||||
return new LexResult("EOF", null, pos);
|
||||
}
|
||||
|
||||
var match;
|
||||
|
|
2
Makefile
2
Makefile
|
@ -5,7 +5,7 @@ compress: build/katex.min.js
|
|||
@printf "Minified, gzipped size: "
|
||||
@gzip -c $^ | wc -c
|
||||
|
||||
build/katex.js: katex.js Parser.js Lexer.js
|
||||
build/katex.js: katex.js $(wildcard *.js)
|
||||
./node_modules/.bin/browserify $< --standalone katex > $@
|
||||
|
||||
build/katex.min.js: build/katex.js
|
||||
|
|
|
@ -46,7 +46,7 @@ Parser.prototype.parseInput = function(pos) {
|
|||
var expression = this.parseExpression(pos);
|
||||
// If we succeeded, make sure there's an EOF at the end
|
||||
var EOF = this.lexer.lex(expression.position);
|
||||
expect(EOF, 'EOF');
|
||||
expect(EOF, "EOF");
|
||||
return expression;
|
||||
};
|
||||
|
||||
|
|
2
Style.js
2
Style.js
|
@ -61,5 +61,5 @@ var fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];
|
|||
|
||||
module.exports = {
|
||||
DISPLAY: styles[D],
|
||||
TEXT: styles[T],
|
||||
TEXT: styles[T]
|
||||
};
|
||||
|
|
2
katex.js
2
katex.js
|
@ -10,7 +10,7 @@ var buildExpression = function(style, color, expression, prev) {
|
|||
var group = expression[i];
|
||||
groups.push(buildGroup(style, color, group, prev));
|
||||
prev = group;
|
||||
};
|
||||
}
|
||||
return groups;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user