mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 17:51:39 +08:00
bugfix: #351 only auto pair double quote
This commit is contained in:
parent
b9866cb662
commit
32f954faec
@ -397,8 +397,7 @@ const updateCtrl = ContentState => {
|
||||
'(': ')',
|
||||
'*': '*',
|
||||
'_': '_',
|
||||
'"': '"',
|
||||
"'": "'"
|
||||
'"': '"'
|
||||
}
|
||||
|
||||
if (start.key === end.key && start.offset === end.offset && event.type === 'input') {
|
||||
@ -409,7 +408,7 @@ const updateCtrl = ContentState => {
|
||||
const postInputChar = text.charAt(+offset)
|
||||
/* eslint-disable no-useless-escape */
|
||||
if (
|
||||
(autoPairQuote && /["']{1}/.test(inputChar)) ||
|
||||
(autoPairQuote && /["]{1}/.test(inputChar)) ||
|
||||
(autoPairBracket && /[\{\[\(]{1}/.test(inputChar)) ||
|
||||
(autoPairMarkdownSyntax && /[*_]{1}/.test(inputChar))
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user