Skip to content

Commit

Permalink
fix: word matching issue and suggestion widget position in MonacoEdit…
Browse files Browse the repository at this point in the history
…or (#750)
  • Loading branch information
huaxiabuluo authored Jan 19, 2024
1 parent 0c0cc37 commit ef581e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/MonacoEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -347,6 +347,7 @@ const MonacoEditor = (props: IProps) => {
minimap: { enabled: false },
fontSize: 13,
automaticLayout: true,
fixedOverflowWidgets: true,
}}
onMount={onMount}
className={className}
Expand Down

0 comments on commit ef581e7

Please sign in to comment.