From 654fd5f8cc5693b7cd7c47c9a485ff0eb98a71bb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 17 Apr 2024 13:43:23 +0300 Subject: =?UTF-8?q?fixes=20#4348=20(NewStory:=20=D1=82=D0=B0=D0=B1=D1=83?= =?UTF-8?q?=D0=BB=D1=8F=D1=86=D0=B8=D1=8F=20=D0=B2=20=D1=80=D0=B5=D0=B6?= =?UTF-8?q?=D0=B8=D0=BC=D0=B5=20=D0=BF=D1=80=D0=BE=D1=81=D0=BC=D0=BE=D1=82?= =?UTF-8?q?=D1=80=D0=B0=20=D1=81=D1=8A=D0=B5=D0=B4=D0=B0=D0=B5=D1=82=D1=81?= =?UTF-8?q?=D1=8F,=20=D0=B0=20=D0=B2=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC?= =?UTF-8?q?=D0=B5=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=B5=D1=82)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/templates.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugins') diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 4172521496..d6c0472836 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -175,6 +175,15 @@ static void AppendString(CMStringW &buf, const wchar_t *p, ItemData *pItem) p = p1 + 5; } } + else if (!wcsncmp(p, L"code]", 5)) { + 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; + } + } else { buf.AppendChar('['); if (*pEnd == '/') -- cgit v1.2.3