From 0bb46c9d670941fda6f34419697411d374d82f0e Mon Sep 17 00:00:00 2001 From: Azareal Date: Mon, 8 Apr 2019 17:50:10 +1000 Subject: [PATCH] Use #container instead of .container for Cosora. Added six parser tests. --- common/common.go | 2 +- parser_test.go | 9 +++++++++ themes/cosora/public/main.css | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/common/common.go b/common/common.go index d82d9a24..718e2de3 100644 --- a/common/common.go +++ b/common/common.go @@ -17,7 +17,7 @@ import ( "github.com/Azareal/Gosora/query_gen" ) -var SoftwareVersion = Version{Major: 0, Minor: 2, Patch: 0, Tag: ""} +var SoftwareVersion = Version{Major: 0, Minor: 3, Patch: 0, Tag: "dev"} // nolint I don't want to write comments for each of these o.o const Hour int = 60 * 60 diff --git a/parser_test.go b/parser_test.go index 5ed85ae3..79a715c1 100644 --- a/parser_test.go +++ b/parser_test.go @@ -85,6 +85,13 @@ func TestPreparser(t *testing.T) { msgList.Add("
hi
", "
hi
") msgList.Add("
hi
", "
<meow>hi</meow>
") msgList.Add("\\
hi
", "<blockquote>hi</blockquote>") + //msgList.Add("\\\\
hi
", "\\
<meow>hi</meow>
") // TODO: Double escapes should print a literal backslash + //msgList.Add("<blockquote>hi</blockquote>", "<blockquote>hi</blockquote>") // TODO: Stop double-entitising this + msgList.Add("\\
hi
\\
hi
", "<blockquote>hi</blockquote><blockquote>hi</blockquote>") + msgList.Add("\\Admin", "<a itemprop="author">Admin</a>") + msgList.Add("
\\Admin
", "
<a itemprop="author">Admin</a>
") + msgList.Add("\n
\\Admin
\n", "
<a itemprop="author">Admin</a>
") + msgList.Add("tt\n
\\Admin
\ntt", "tt\n
<a itemprop="author">Admin</a>
\ntt") msgList.Add("@", "@") msgList.Add("@Admin", "@1") msgList.Add("@Bah", "@Bah") @@ -93,6 +100,8 @@ func TestPreparser(t *testing.T) { msgList.Add("@Admin\n", "@1") msgList.Add("@Admin\ndd", "@1\ndd") msgList.Add("d@Admin", "d@Admin") + msgList.Add("\\@Admin", "@Admin") + //msgList.Add("\\\\@Admin", "@1") //msgList.Add("byte 0", string([]byte{0}), "") msgList.Add("byte 'a'", string([]byte{'a'}), "a") //msgList.Add("byte 255", string([]byte{255}), "") diff --git a/themes/cosora/public/main.css b/themes/cosora/public/main.css index e283cd23..46c4bdec 100644 --- a/themes/cosora/public/main.css +++ b/themes/cosora/public/main.css @@ -57,7 +57,7 @@ body, #main { padding-left: 8px; padding-right: 8px; } -.container { +#container { background-color: var(--element-background-color); }