From faff4a87b467d5e98d809b07b5758d6e099a05bb Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Tue, 11 Jul 2023 14:33:27 +0100 Subject: [PATCH] Never decorate inside math (#13810) GitOrigin-RevId: c28d0aaa3ce267d989db779c13f6b3e91f376686 --- .../source-editor/extensions/visual/atomic-decorations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 8625378040..91fcc7c06c 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 @@ -664,9 +664,10 @@ export const atomicDecorations = (options: Options) => { block: displayMode, }).range(ancestorNode.from, ancestorNode.to) ) - return false } } + + return false // never decorate inside math } else if (nodeRef.type.is('HrefCommand')) { // a hyperlink with URL and content arguments if (shouldDecorate(state, nodeRef)) {