mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 12:38:39 +00:00
Add \ in front of functions in the parser
Auditors: alpert
This commit is contained in:
2
Lexer.js
2
Lexer.js
@@ -45,7 +45,7 @@ Lexer.prototype.lex = function(pos) {
|
||||
var match;
|
||||
if ((match = input.match(anyFunc))) {
|
||||
// If we match one of the tokens, extract the type
|
||||
return new LexResult(match[1], match[0], pos + match[0].length);
|
||||
return new LexResult(match[0], match[0], pos + match[0].length);
|
||||
} else {
|
||||
// Otherwise, we look through the normal token regexes and see if it's
|
||||
// one of them.
|
||||
|
Reference in New Issue
Block a user