Description
When adding quotes to text, draftail_curlify.js places a closing quote (instead of an opening quote) at the beginning of a phrase.
Steps to reproduce
- Add a full width text block
- Type or paste in a few words
The quick brown fox jumps over the lazy dog.
- Place the cursor before "brown"
- Type a double quote (
")
- Place the cursor after "fox"
- Type a double quote (
")
Expected result
The quick “brown fox” jumps over the lazy dog.
U+201C and U+201D
Actual result
The quick ”brown fox” jumps over the lazy dog.
U+201D and U+201D
Related code
This code block is triggered and lastCharacter !== ' ' evaluates to true
const lastCharacter = textContent[textLength - 1]
if (lastCharacter !== ' ') {
replaceCharacter(str === '"' ? DQUOTE_END : SQUOTE_END)
} else {
replaceCharacter(str === '"' ? DQUOTE_START : SQUOTE_START)
}
Description
When adding quotes to text, draftail_curlify.js places a closing quote (instead of an opening quote) at the beginning of a phrase.
Steps to reproduce
")")Expected result
U+201C and U+201D
Actual result
U+201D and U+201D
Related code
This code block is triggered and
lastCharacter !== ' 'evaluates to true