From ef581e78095c809f770e6bafdb980b65980fef21 Mon Sep 17 00:00:00 2001 From: Bruce Date: Fri, 19 Jan 2024 17:08:31 +0800 Subject: [PATCH] fix: word matching issue and suggestion widget position in MonacoEditor (#750) --- app/components/MonacoEditor/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/components/MonacoEditor/index.tsx b/app/components/MonacoEditor/index.tsx index 5178128c..7d0f09a1 100644 --- a/app/components/MonacoEditor/index.tsx +++ b/app/components/MonacoEditor/index.tsx @@ -65,7 +65,7 @@ const createSchemaRegex = (patterns, words, type) => { const patterns = [ '\\b(WORDS)\\b', '(^|\\s)(WORDS)(\\s|$)', // There can be spaces before and after the string - '(?<=^|\\s|\\.\\s|:\\s)(WORDS)', // There can be a '.' or ':' before the string. + '(?<=^|\\s|\\.\\s|:\\s)(WORDS)\\s', // There can be a '.' or ':' before the string. ]; const MonacoEditor = (props: IProps) => { const { intl, currentLocale } = useI18n(); @@ -347,6 +347,7 @@ const MonacoEditor = (props: IProps) => { minimap: { enabled: false }, fontSize: 13, automaticLayout: true, + fixedOverflowWidgets: true, }} onMount={onMount} className={className}