1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Desktop: Fixes #6630: Made autoMatchBraces work on CJK characters (#6858)

This commit is contained in:
Self Not Found 2022-10-01 00:03:45 +08:00 committed by GitHub
parent 29f1abb666
commit cc6620a7e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -848,6 +848,8 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
function renderEditor() {
const matchBracesOptions = Setting.value('editor.autoMatchingBraces') ? { override: true, pairs: '<>()[]{}\'\'""‘’“”()《》「」『』【】〔〕〖〗〘〙〚〛' } : false;
return (
<div style={cellEditorStyle}>
<Editor
@ -858,7 +860,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
codeMirrorTheme={styles.editor.codeMirrorTheme}
style={styles.editor}
readOnly={props.visiblePanes.indexOf('editor') < 0}
autoMatchBraces={Setting.value('editor.autoMatchingBraces')}
autoMatchBraces={matchBracesOptions}
keyMap={props.keyboardMode}
plugins={props.plugins}
onChange={codeMirror_change}

View File

@ -86,7 +86,7 @@ export interface EditorProps {
style: any;
codeMirrorTheme: any;
readOnly: boolean;
autoMatchBraces: boolean;
autoMatchBraces: boolean | object;
keyMap: string;
plugins: PluginStates;
onChange: any;