From 2e421e8aede67a73e2901137a2a44544fa26d3b7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 18 Dec 2017 21:06:44 +0400 Subject: [PATCH] Allow unicode quotes as markdown entry separators. Fixes #3867. --- Telegram/SourceFiles/ui/text/text_entity.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/ui/text/text_entity.cpp b/Telegram/SourceFiles/ui/text/text_entity.cpp index cc1c89064..d7b0d64de 100644 --- a/Telegram/SourceFiles/ui/text/text_entity.cpp +++ b/Telegram/SourceFiles/ui/text/text_entity.cpp @@ -28,12 +28,12 @@ namespace { QString ExpressionDomain() { // Matches any domain name, containing at least one '.', including "file.txt". - return QString::fromUtf8("(?|'\"\\[\\]\\{\\}\\~\\!\\?\\%\\^\\(\\)\\-\\+=\\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() {