Skip to content

Commit 2156da1

Browse files
fix(editor, version): 优化编辑器中的单词分隔符
- 在 PromptEditor 和 CompareModal 组件中添加中文标点符号作为单词分隔符
1 parent 2d43e7f commit 2156da1

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/components/editor/PromptEditor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ const PromptEditor = forwardRef<PromptEditorRef, PromptEditorProps>(
232232
overviewRulerLanes: 0,
233233
overviewRulerBorder: false,
234234
occurrencesHighlight: 'off',
235+
wordSeparators: "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?、,。;()·!¥…—+【】:",
235236
}}
236237
/>
237238
{isTouchDevice && (

src/components/version/CompareModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ export function CompareModal({
242242
renderLineHighlight: 'none',
243243
overviewRulerLanes: 0,
244244
overviewRulerBorder: false,
245+
wordSeparators: "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?、,。;()·!¥…—+【】:",
245246
}}
246247
/>
247248
)}

0 commit comments

Comments
 (0)