MCPcopy Index your code
hub / github.com/TruthHun/BookStack / handleSupSubscript

Method handleSupSubscript

static/katex/katex.mjs:15085–15098  ·  view source on GitHub ↗

* Handle a subscript or superscript with nice errors.

(name)

Source from the content-addressed store, hash-verified

15083 * Handle a subscript or superscript with nice errors.
15084 */
15085 handleSupSubscript(name) {
15086 const symbolToken = this.nextToken;
15087 const symbol = symbolToken.text;
15088 this.consume();
15089 this.consumeSpaces(); // ignore spaces before sup/subscript argument
15090
15091 const group = this.parseGroup(name, false, Parser.SUPSUB_GREEDINESS);
15092
15093 if (!group) {
15094 throw new ParseError("Expected group after '" + symbol + "'", symbolToken);
15095 }
15096
15097 return group;
15098 }
15099 /**
15100 * Converts the textual input of an unsupported command into a text node
15101 * contained within a color node whose color is determined by errorColor

Callers 3

parseAtomMethod · 0.95
katex.jsFile · 0.80
katex.min.jsFile · 0.80

Calls 3

consumeMethod · 0.95
consumeSpacesMethod · 0.95
parseGroupMethod · 0.95

Tested by

no test coverage detected