diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 56ef7e89..70d99c66 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ We are really excited that you are interested in contributing to MarkText :tada: ## Philosophy 🔑 Our philosophy is to keep things clean, simple and minimal. -MarkText is constantly changing and we want these improvements to align with our philosphy. For example, look at the side bar and tabs; these two panels provide awesome functionality *and* aren't distracting to the user. We'll continue adding more features (like plugins) that can be activated via 'settings' to improve MarkText. This will allow everyone to customize MarkText for their needs and provide a minimal default interface. +MarkText is constantly changing and we want these improvements to align with our philosophy. For example, look at the side bar and tabs; these two panels provide awesome functionality *and* aren't distracting to the user. We'll continue adding more features (like plugins) that can be activated via 'settings' to improve MarkText. This will allow everyone to customize MarkText for their needs and provide a minimal default interface. ## Issue Reporting Guidelines diff --git a/src/muya/lib/contentState/inputCtrl.js b/src/muya/lib/contentState/inputCtrl.js index 2b38320b..55c6d38e 100644 --- a/src/muya/lib/contentState/inputCtrl.js +++ b/src/muya/lib/contentState/inputCtrl.js @@ -225,9 +225,9 @@ const inputCtrl = ContentState => { // Issue 2566: Do not complete markdown syntax if the previous character is // alphanumeric. !/\\/.test(preInputChar) && - ((autoPairQuote && /[']{1}/.test(inputChar) && !(/[a-zA-Z\d]{1}/.test(preInputChar))) || - (autoPairQuote && /["]{1}/.test(inputChar)) || - (autoPairBracket && /[\{\[\(]{1}/.test(inputChar)) || + ((autoPairQuote && /[']{1}/.test(inputChar) && !(/[\S]{1}/.test(postInputChar)) && !(/[a-zA-Z\d]{1}/.test(preInputChar))) || + (autoPairQuote && /["]{1}/.test(inputChar) && !(/[\S]{1}/.test(postInputChar))) || + (autoPairBracket && /[\{\[\(]{1}/.test(inputChar) && !(/[\S]{1}/.test(postInputChar))) || (block.functionType !== 'codeContent' && !isInInlineMath && !isInInlineCode && autoPairMarkdownSyntax && !/[a-z0-9]{1}/i.test(preInputChar) && /[*$`~_]{1}/.test(inputChar))) ) { needRender = true