[Improvement] Don't replace no-break and zero-width spaces

This commit is contained in:
Eric Kotato 2022-09-15 23:27:25 +03:00 committed by Eric Kotato
parent 3b5cbd8713
commit df12d1b99e

View file

@ -422,7 +422,10 @@ void Parser::parseCurrentChar() {
_emojiLookback = 0;
const auto inCustomEmoji = !_customEmojiData.isEmpty();
const auto isNewLine = !inCustomEmoji && _multiline && IsNewline(_ch);
const auto replaceWithSpace = IsSpace(_ch) && (_ch != QChar::Nbsp);
const auto replaceWithSpace = IsSpace(_ch)
&& (_ch != QChar::Nbsp)
&& _ch != QChar(160)
&& _ch != QChar(8203);
const auto isDiac = IsDiac(_ch);
const auto isTilde = !inCustomEmoji && _checkTilde && (_ch == '~');
const auto skip = [&] {