refactor: move zero width replacement to a function (#5594)

This commit is contained in:
nerix
2024-09-28 14:49:26 +02:00
committed by GitHub
parent e149be3820
commit d0bcf35fdc
7 changed files with 89 additions and 46 deletions
+7
View File
@@ -182,4 +182,11 @@ constexpr std::optional<std::decay_t<T>> makeConditionedOptional(bool condition,
return std::nullopt;
}
/// @brief Unescapes zero width joiners (ZWJ; U+200D) from Twitch messages
///
/// Older Chatterino versions escape ZWJ with an ESCAPE TAG (U+E0002), following
/// https://mm2pl.github.io/emoji_rfc.pdf. This function unescapes all tags with
/// a ZWJ. See also: https://github.com/Chatterino/chatterino2/issues/3384.
QString unescapeZeroWidthJoiner(QString escaped);
} // namespace chatterino