From 2cde8069f2d7c2963ae10cca5f520462ac3a4a49 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 30 Sep 2024 18:21:55 +0300 Subject: =?UTF-8?q?fixes=20#4700=20(Telegram:=20=D0=BD=D0=B5=20=D0=B4?= =?UTF-8?q?=D0=BE=D1=85=D0=BE=D0=B4=D1=8F=D1=82=20=D0=B2=D1=85=D0=BE=D0=B4?= =?UTF-8?q?=D1=8F=D1=89=D0=B8=D0=B5=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F,=20=D1=81=D0=BE=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=B0=D1=89=D0=B8=D0=B5=20=D1=86=D0=B8=D1=82=D0=B0=D1=82=D1=83?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/templates.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'plugins/NewStory') diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 589016b072..bb3c4ecfca 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -204,13 +204,20 @@ static void AppendString(CMStringW &buf, const wchar_t *p, ItemData *pItem) buf.AppendFormat(L""); } else if (!wcsncmp(p, L"code]", 5)) { + p += 4; + buf.AppendFormat(L"
");
+			}
+			else if (!wcsncmp(p, L"/code]", 6)) {
 				p += 5;
-
-				if (auto *p1 = wcsstr(p, L"[/code]")) {
-					CMStringW wszUrl(p, int(p1 - p));
-					buf.AppendFormat(L"
%s
", wszUrl.c_str()); - p = p1 + 6; - } + buf.AppendFormat(L"
"); + } + else if (!wcsncmp(p, L"quote]", 6)) { + p += 5; + buf.AppendFormat(L"
"); + } + else if (!wcsncmp(p, L"/quote]", 7)) { + p += 6; + buf.AppendFormat(L"
"); } else { buf.AppendChar('['); @@ -237,8 +244,7 @@ CMStringW ItemData::formatHtml(const wchar_t *pwszStr) str.AppendFormat(L"body {margin: 0px; text-align: left; %s; color: NSText; overflow: auto;}\n", font2html(F.lf, szFont)); str.AppendFormat(L".nick {color: #%06X }\n", color2html(g_colorTable[(dbe.flags & DBEF_SENT) ? COLOR_OUTNICK : COLOR_INNICK].cl)); str.AppendFormat(L".link {color: #%06X }\n", color2html(g_colorTable[COLOR_LINK].cl)); - if (qtext) - str.AppendFormat(L".quote {border-left: 4px solid #%06X; padding-left: 8px; }\n", color2html(g_colorTable[COLOR_QUOTE].cl)); + str.AppendFormat(L".quote {border-left: 4px solid #%06X; padding-left: 8px; }\n", color2html(g_colorTable[COLOR_QUOTE].cl)); str.Append(L"\n"); -- cgit v1.2.3