bugfix: #351 only auto pair double quote

This commit is contained in:
Jocs 2018-06-18 22:47:58 +08:00
parent b9866cb662
commit 32f954faec

View File

@ -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))
) {