Skip to content

Commit

Permalink
Use #container instead of .container for Cosora.
Browse files Browse the repository at this point in the history
Added six parser tests.
  • Loading branch information
Azareal committed Apr 8, 2019
1 parent 0dd4db4 commit 0bb46c9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ func TestPreparser(t *testing.T) {
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>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("@Admin", "@1")
msgList.Add("@Bah", "@Bah")
Expand All @@ -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}), "")
Expand Down
2 changes: 1 addition & 1 deletion themes/cosora/public/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ body, #main {
padding-left: 8px;
padding-right: 8px;
}
.container {
#container {
background-color: var(--element-background-color);
}

Expand Down

0 comments on commit 0bb46c9

Please sign in to comment.