summaryrefslogtreecommitdiff
path: root/gemini/gemtext/htmlconv/convert_test.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-04-29 13:45:38 -0600
committertjpcc <tjp@ctrl-c.club>2023-04-29 13:45:38 -0600
commitaa6bdb0649c2f2a63b4deae8c4984a660cd0400a (patch)
treebe5d7b3cf21115199b9127050a8ca459a287a9b5 /gemini/gemtext/htmlconv/convert_test.go
parent46ad450327111b9d28b592658d75ef57da498298 (diff)
include a CSS class in htmlconv output
Diffstat (limited to 'gemini/gemtext/htmlconv/convert_test.go')
-rw-r--r--gemini/gemtext/htmlconv/convert_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/gemini/gemtext/htmlconv/convert_test.go b/gemini/gemtext/htmlconv/convert_test.go
index 641ffb8..6e8bfcd 100644
--- a/gemini/gemtext/htmlconv/convert_test.go
+++ b/gemini/gemtext/htmlconv/convert_test.go
@@ -32,8 +32,9 @@ This is some non-blank regular text.
func TestConvert(t *testing.T) {
htmlDoc := `
-<html><body><h1>top-level header line</h1><h2>subtitle</h2><p>This is some non-blank regular text.
-</p><ul><li>an</li><li>unordered</li><li>list</li></ul><p>=> <a href="gemini://google.com/">as if</a></p><p>=> <a href="https://google.com/">https://google.com/</a></p><blockquote> this is a quote</blockquote><blockquote> -tjp</blockquote><pre>doc := gemtext.Parse(req.Body)
+<!DOCTYPE html>
+<html><body class="gemtext"><h1 class="gemtext">top-level header line</h1><h2 class="gemtext">subtitle</h2><p class="gemtext">This is some non-blank regular text.
+</p><ul class="gemtext"><li class="gemtext">an</li><li class="gemtext">unordered</li><li class="gemtext">list</li></ul><p class="gemtext">=> <a class="gemtext" href="gemini://google.com/">as if</a></p><p class="gemtext">=> <a class="gemtext" href="https://google.com/">https://google.com/</a></p><blockquote class="gemtext"> this is a quote</blockquote><blockquote class="gemtext"> -tjp</blockquote><pre class="gemtext">doc := gemtext.Parse(req.Body)
</pre></body></html>`[1:]
doc, err := gemtext.Parse(bytes.NewBufferString(gmiDoc))