Upgrade Katex to v0.16.10
This commit is contained in:
7
paige/node_modules/katex/src/Parser.js
generated
vendored
7
paige/node_modules/katex/src/Parser.js
generated
vendored
@@ -405,19 +405,20 @@ export default class Parser {
|
||||
// We treat these similarly to the unicode-math package.
|
||||
// So we render a string of Unicode (sub|super)scripts the
|
||||
// same as a (sub|super)script of regular characters.
|
||||
let str = uSubsAndSups[lex.text];
|
||||
const isSub = unicodeSubRegEx.test(lex.text);
|
||||
const subsupTokens = [];
|
||||
subsupTokens.push(new Token(uSubsAndSups[lex.text]));
|
||||
this.consume();
|
||||
// Continue fetching tokens to fill out the string.
|
||||
while (true) {
|
||||
const token = this.fetch().text;
|
||||
if (!(uSubsAndSups[token])) { break; }
|
||||
if (unicodeSubRegEx.test(token) !== isSub) { break; }
|
||||
subsupTokens.unshift(new Token(uSubsAndSups[token]));
|
||||
this.consume();
|
||||
str += uSubsAndSups[token];
|
||||
}
|
||||
// Now create a (sub|super)script.
|
||||
const body = (new Parser(str, this.settings)).parse();
|
||||
const body = this.subparse(subsupTokens);
|
||||
if (isSub) {
|
||||
subscript = {type: "ordgroup", mode: "math", body};
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user