Merge pull request #19157 from overleaf/mj-separate-unknowncommands

[lezer] Separate unknown commands for definition fragments

GitOrigin-RevId: 21ce8d03e68f4af13c3937b4b5fd6f7ed0e50995
This commit is contained in:
Mathias Jakobsen 2024-06-26 10:28:58 +01:00 committed by Copybot
parent 3b5af94404
commit d21da7d084
2 changed files with 3 additions and 2 deletions

View file

@ -521,7 +521,7 @@ DefinitionFragmentArgument {
DefinitionFragmentCommand {
KnownCommand<TextArgument>
| UnknownCommand { genericUnknownCommandWithOptionalArguments<DefinitionFragmentArgument, OptionalArgument> }
| DefinitionFragmentUnknownCommand { genericUnknownCommandWithOptionalArguments<DefinitionFragmentArgument, OptionalArgument> }
| KnownCtrlSym
}

View file

@ -75,7 +75,8 @@ export const enterNode = (
} else if (
node.type.is('UnknownCommand') ||
node.type.is('KnownCommand') ||
node.type.is('MathUnknownCommand')
node.type.is('MathUnknownCommand') ||
node.type.is('DefinitionFragmentUnknownCommand')
) {
let commandNode: SyntaxNode | null = node.node
if (node.type.is('KnownCommand')) {