From b06f2ef5bbeac7a2c4c6e2588b1c89f621a2dc07 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Sun, 24 Dec 2017 22:41:26 +0700 Subject: [PATCH] Allow unicode quotes as markdown entry separators. Fixes #13. --- 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() {