summaryrefslogtreecommitdiff
path: root/plugins/NewStory
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewStory')
-rw-r--r--plugins/NewStory/src/templates.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp
index 4a48c1b404..36c6cedadb 100644
--- a/plugins/NewStory/src/templates.cpp
+++ b/plugins/NewStory/src/templates.cpp
@@ -207,19 +207,11 @@ static void AppendString(CMStringW &buf, const wchar_t *p, ItemData *pItem)
}
else if (!wcsncmp(p, L"code]", 5)) {
p += 4;
- buf.AppendFormat(L"<pre>");
- }
- else if (!wcsncmp(p, L"/code]", 6)) {
- p += 5;
- buf.AppendFormat(L"</pre>");
+ buf.AppendFormat(*pEnd ? L"</pre>" : L"<pre>");
}
else if (!wcsncmp(p, L"quote]", 6)) {
p += 5;
- buf.AppendFormat(L"<div class=\"quote\">");
- }
- else if (!wcsncmp(p, L"/quote]", 7)) {
- p += 6;
- buf.AppendFormat(L"</div>");
+ buf.AppendFormat(*pEnd ? L"</div>" : L"<div class=\"quote\">" );
}
else {
buf.AppendChar('[');