Use #container instead of .container for Cosora.

Added six parser tests.
This commit is contained in:
Azareal 2019-04-08 17:50:10 +10:00
parent 0dd4db4d03
commit 0bb46c9d67
3 changed files with 11 additions and 2 deletions

View File

@ -17,7 +17,7 @@ import (
"github.com/Azareal/Gosora/query_gen" "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 // nolint I don't want to write comments for each of these o.o
const Hour int = 60 * 60 const Hour int = 60 * 60

View File

@ -85,6 +85,13 @@ func TestPreparser(t *testing.T) {
msgList.Add("<blockquote><b>hi</b></blockquote>", "<blockquote><strong>hi</strong></blockquote>") msgList.Add("<blockquote><b>hi</b></blockquote>", "<blockquote><strong>hi</strong></blockquote>")
msgList.Add("<blockquote><meow>hi</meow></blockquote>", "<blockquote>&lt;meow&gt;hi&lt;/meow&gt;</blockquote>") msgList.Add("<blockquote><meow>hi</meow></blockquote>", "<blockquote>&lt;meow&gt;hi&lt;/meow&gt;</blockquote>")
msgList.Add("\\<blockquote>hi</blockquote>", "&lt;blockquote&gt;hi&lt;/blockquote&gt;") msgList.Add("\\<blockquote>hi</blockquote>", "&lt;blockquote&gt;hi&lt;/blockquote&gt;")
//msgList.Add("\\\\<blockquote><meow>hi</meow></blockquote>", "\\<blockquote>&lt;meow&gt;hi&lt;/meow&gt;</blockquote>") // TODO: Double escapes should print a literal backslash
//msgList.Add("&lt;blockquote&gt;hi&lt;/blockquote&gt;", "&lt;blockquote&gt;hi&lt;/blockquote&gt;") // TODO: Stop double-entitising this
msgList.Add("\\<blockquote>hi</blockquote>\\<blockquote>hi</blockquote>", "&lt;blockquote&gt;hi&lt;/blockquote&gt;&lt;blockquote&gt;hi&lt;/blockquote&gt;")
msgList.Add("\\<a itemprop=\"author\">Admin</a>", "&lt;a itemprop=&#34;author&#34;&gt;Admin&lt;/a&gt;")
msgList.Add("<blockquote>\\<a itemprop=\"author\">Admin</a></blockquote>", "<blockquote>&lt;a itemprop=&#34;author&#34;&gt;Admin&lt;/a&gt;</blockquote>")
msgList.Add("\n<blockquote>\\<a itemprop=\"author\">Admin</a></blockquote>\n", "<blockquote>&lt;a itemprop=&#34;author&#34;&gt;Admin&lt;/a&gt;</blockquote>")
msgList.Add("tt\n<blockquote>\\<a itemprop=\"author\">Admin</a></blockquote>\ntt", "tt\n<blockquote>&lt;a itemprop=&#34;author&#34;&gt;Admin&lt;/a&gt;</blockquote>\ntt")
msgList.Add("@", "@") msgList.Add("@", "@")
msgList.Add("@Admin", "@1") msgList.Add("@Admin", "@1")
msgList.Add("@Bah", "@Bah") msgList.Add("@Bah", "@Bah")
@ -93,6 +100,8 @@ func TestPreparser(t *testing.T) {
msgList.Add("@Admin\n", "@1") msgList.Add("@Admin\n", "@1")
msgList.Add("@Admin\ndd", "@1\ndd") msgList.Add("@Admin\ndd", "@1\ndd")
msgList.Add("d@Admin", "d@Admin") msgList.Add("d@Admin", "d@Admin")
msgList.Add("\\@Admin", "@Admin")
//msgList.Add("\\\\@Admin", "@1")
//msgList.Add("byte 0", string([]byte{0}), "") //msgList.Add("byte 0", string([]byte{0}), "")
msgList.Add("byte 'a'", string([]byte{'a'}), "a") msgList.Add("byte 'a'", string([]byte{'a'}), "a")
//msgList.Add("byte 255", string([]byte{255}), "") //msgList.Add("byte 255", string([]byte{255}), "")

View File

@ -57,7 +57,7 @@ body, #main {
padding-left: 8px; padding-left: 8px;
padding-right: 8px; padding-right: 8px;
} }
.container { #container {
background-color: var(--element-background-color); background-color: var(--element-background-color);
} }