diff --git a/services/web/frontend/js/features/source-editor/lezer-latex/latex.grammar b/services/web/frontend/js/features/source-editor/lezer-latex/latex.grammar index 82efa49c4a..84e7c4fa3a 100644 --- a/services/web/frontend/js/features/source-editor/lezer-latex/latex.grammar +++ b/services/web/frontend/js/features/source-editor/lezer-latex/latex.grammar @@ -521,7 +521,7 @@ DefinitionFragmentArgument { DefinitionFragmentCommand { KnownCommand - | UnknownCommand { genericUnknownCommandWithOptionalArguments } + | DefinitionFragmentUnknownCommand { genericUnknownCommandWithOptionalArguments } | KnownCtrlSym } diff --git a/services/web/frontend/js/features/source-editor/utils/tree-operations/commands.ts b/services/web/frontend/js/features/source-editor/utils/tree-operations/commands.ts index ccec68aca9..9cdab1ee75 100644 --- a/services/web/frontend/js/features/source-editor/utils/tree-operations/commands.ts +++ b/services/web/frontend/js/features/source-editor/utils/tree-operations/commands.ts @@ -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')) {