You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.NotContains(t, html, "\n", "Plain text markdown is intended for OpenGraph descriptions and therefore shouldn't contain newlines")
69
+
})
70
+
}
71
+
30
72
funcTestBBCode(t*testing.T) {
31
73
t.Run("[code]", func(t*testing.T) {
32
74
t.Run("one line", func(t*testing.T) {
33
-
html:=ParseMarkdown("[code]Just some code, you know?[/code]", ForumRealMarkdown)
75
+
html:=ParseMarkdown("[code]Just some code, you know?[/code]", PostMarkdown)
34
76
t.Log(html)
35
77
assert.Equal(t, 1, strings.Count(html, "<pre"))
36
78
assert.Contains(t, html, `class="hmn-code"`)
@@ -41,7 +83,7 @@ func TestBBCode(t *testing.T) {
41
83
Multiline code
42
84
with an indent
43
85
[/code]`
44
-
html:=ParseMarkdown(bbcode, ForumRealMarkdown)
86
+
html:=ParseMarkdown(bbcode, PostMarkdown)
45
87
t.Log(html)
46
88
assert.Equal(t, 1, strings.Count(html, "<pre"))
47
89
assert.Contains(t, html, `class="hmn-code"`)
@@ -54,7 +96,7 @@ func main() {
54
96
fmt.Println("Hello, world!")
55
97
}
56
98
[/code]`
57
-
html:=ParseMarkdown(bbcode, ForumRealMarkdown)
99
+
html:=ParseMarkdown(bbcode, PostMarkdown)
58
100
t.Log(html)
59
101
assert.Equal(t, 1, strings.Count(html, "<pre"))
60
102
assert.Contains(t, html, "Println")
@@ -66,7 +108,7 @@ func main() {
66
108
funcTestSharlock(t*testing.T) {
67
109
t.Skipf("This doesn't pass right now because parts of Sharlock's original source read as indented code blocks, or depend on different line break behavior.")
0 commit comments