Merge pull request #19072 from overleaf/mj-known-commands-reuse

[web] Parse known commands in math mode

GitOrigin-RevId: e7937fc46320f13c716d1612eca36aa67c8fb967
This commit is contained in:
Mathias Jakobsen
2024-06-25 11:12:14 +00:00
committed by Copybot
parent 283c972842
commit 46a160f127
2 changed files with 21 additions and 31 deletions
@@ -75,14 +75,13 @@ export const enterNode = (
} else if (
node.type.is('UnknownCommand') ||
node.type.is('KnownCommand') ||
node.type.is('MathUnknownCommand') ||
node.type.is('MathKnownCommand')
node.type.is('MathUnknownCommand')
) {
let commandNode: SyntaxNode | null = node.node
if (node.type.is('KnownCommand') || node.type.is('MathKnownCommand')) {
// (Math)KnownCommands are defined as
if (node.type.is('KnownCommand')) {
// KnownCommands are defined as
//
// (Math)KnownCommand {
// KnownCommand {
// CommandName {
// CommandCtrlSeq [args]
// }