Fix typo (replacing strings by program and not checking the results is a bad idea)

This commit is contained in:
naskya 2023-03-26 11:47:20 +09:00
parent 3e31d808dc
commit c7d9bc1aee
No known key found for this signature in database
GPG Key ID: 164DFF24E2D40139
1 changed files with 2 additions and 2 deletions

View File

@ -12,10 +12,10 @@ function parseSingleKaTeXMacro(src: string): [string, KaTeXMacro] {
return pos;
};
if (!src.startsWith("\\newmacro") || src.slice(-1) !== "}")
if (!src.startsWith("\\newcommand") || src.slice(-1) !== "}")
return invalid;
// current index we are checking (= "\\newmacro".length)
// current index we are checking (= "\\newcommand".length)
let currentPos: number = 11;
currentPos = skipSpaces(currentPos);