From 31ed5214f023f99a40d3e73938d95ac630c26d13 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Sun, 24 Dec 2017 23:30:13 +0700 Subject: [PATCH] Allow unicode quotes as markdown entry separators. (#54) Fixes #13. (Based on upstream's commit telegramdesktop/tdesktop@2e421e8, ) --- Telegram/SourceFiles/ui/text/text_entity.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/ui/text/text_entity.cpp b/Telegram/SourceFiles/ui/text/text_entity.cpp index 1bfde37b7..e4adc0e9e 100644 --- a/Telegram/SourceFiles/ui/text/text_entity.cpp +++ b/Telegram/SourceFiles/ui/text/text_entity.cpp @@ -44,7 +44,9 @@ QString ExpressionMailNameAtEnd() { } QString ExpressionSeparators(const QString &additional) { - return qsl("\\s\\.,:;<>|'\"\\[\\]\\{\\}\\~\\!\\?\\%\\^\\(\\)\\-\\+=\\x10") + additional; + // UTF8 quotes: «»“”‘’ + const auto quotes = QString::fromUtf8("\xC2\xAB\xC2\xBB\xE2\x80\x9C\xE2\x80\x9D\xE2\x80\x98\xE2\x80\x99"); + return qsl("\\s\\.,:;<>|'\"\\[\\]\\{\\}\\~\\!\\?\\%\\^\\(\\)\\-\\+=\\x10") + quotes + additional; } QString ExpressionHashtag() {