add spaces at end of lines which only contain blockquote markers

This commit is contained in:
SeinopSys 2021-10-03 20:08:14 +02:00
parent a55c511775
commit ea96900707
No known key found for this signature in database
GPG key ID: 9BFB053C1BA6C5C4

View file

@ -187,6 +187,9 @@ function wrapLines(textarea, options, eachLine = true) {
? prefix + text.trim() + suffix
: text.split(/\n/g).map(line => prefix + line.trim() + suffix).join('\n');
// Force a space at the end of lines with only blockquote markers
newText = newText.replace(/^((?:>\s+)*)>$/gm, '$1> ')
return { newText, caretOffset: emptyText ? prefix.length : newText.length };
}, eachLine);
}