({parser, funcName})
| 66 | allowedInText: true, |
| 67 | |
| 68 | handler({parser, funcName}) { |
| 69 | parser.consumeSpaces(); |
| 70 | const token = parser.fetch(); |
| 71 | if (globalMap[token.text]) { |
| 72 | // KaTeX doesn't have \par, so ignore \long |
| 73 | if (funcName === "\\global" || funcName === "\\\\globallong") { |
| 74 | token.text = globalMap[token.text]; |
| 75 | } |
| 76 | return assertNodeType(parser.parseFunction(), "internal"); |
| 77 | } |
| 78 | throw new ParseError(`Invalid token after macro prefix`, token); |
| 79 | }, |
| 80 | }); |
| 81 | |
| 82 | // Basic support for macro definitions: \def, \gdef, \edef, \xdef |
nothing calls this directly
no test coverage detected
searching dependent graphs…