From 0061fe02d62a38d3f819911e763c22072018933d Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Fri, 8 Dec 2023 09:38:04 +0000 Subject: [PATCH] [visual] Decorate keywords command (#13724) GitOrigin-RevId: ffd737705098c8a3eb0de5fe8ffbbc656c30d17c --- .../extensions/visual/atomic-decorations.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/web/frontend/js/features/source-editor/extensions/visual/atomic-decorations.ts b/services/web/frontend/js/features/source-editor/extensions/visual/atomic-decorations.ts index abd7ffaa03..9e520394f1 100644 --- a/services/web/frontend/js/features/source-editor/extensions/visual/atomic-decorations.ts +++ b/services/web/frontend/js/features/source-editor/extensions/visual/atomic-decorations.ts @@ -1029,6 +1029,18 @@ export const atomicDecorations = (options: Options) => { ) ) } + } else if (commandName === '\\keywords') { + if (shouldDecorate(state, nodeRef)) { + // command name and opening brace + decorations.push( + ...decorateArgumentBraces( + new BraceWidget('keywords: '), + textArgumentNode, + nodeRef.from + ) + ) + return false + } } else if ( commandName === '\\footnote' || commandName === '\\endnote'