summaryrefslogtreecommitdiff
path: root/gemtext/mdconv/convert_test.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-15 19:59:58 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-15 19:59:58 -0700
commit4c2630752f7367fff491a6ba53303e9102da7da0 (patch)
tree7819a03ddd08e9ee017e7245dfd58cde9f51857d /gemtext/mdconv/convert_test.go
parentcec3718bdd089bcf58575740c5ae4f86b27226d1 (diff)
Completed markdown and HTML conversion.
Diffstat (limited to 'gemtext/mdconv/convert_test.go')
-rw-r--r--gemtext/mdconv/convert_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/gemtext/mdconv/convert_test.go b/gemtext/mdconv/convert_test.go
index 6cde08b..010ddce 100644
--- a/gemtext/mdconv/convert_test.go
+++ b/gemtext/mdconv/convert_test.go
@@ -78,17 +78,16 @@ text:
> quote: this is a quote
> quote: -tjp
text:
-`[1:] + "pftoggle: ```\npf: doc := gemtext.Parse(req.Body)\npftoggle: ```\n"
+`[1:] + "```\npf: doc := gemtext.Parse(req.Body)\n```\n"
overrides := template.Must(template.New("overrides").Parse((`
{{define "textline"}}text: {{.}}{{end}}
{{define "linkline"}}=> link: [{{if eq .Label ""}}{{.URL}}{{else}}{{.Label}}{{end}}]({{.URL}})` + "\n" + `{{end}}
- {{define "preformattoggleline"}}pftoggle: ` + "```\n" + `{{end}}
- {{define "preformattedtextline"}}pf: {{.}}{{end}}
+ {{define "preformattedtextlines"}}` + "```\n" + `{{range . }}pf: {{.}}{{end}}` + "```\n" + `{{end}}
{{define "heading1line"}}# h1: {{.Body}}` + "\n" + `{{end}}
{{define "heading2line"}}## h2: {{.Body}}` + "\n" + `{{end}}
{{define "heading3line"}}### h3: {{.Body}}` + "\n" + `{{end}}
- {{define "listitemline"}}* li: {{.Body}}` + "\n" + `{{end}}
+ {{define "listitemlines"}}{{range .}}* li: {{.Body}}` + "\n" + `{{end}}{{end}}
{{define "quoteline"}}> quote: {{.Body}}` + "\n" + `{{end}}
`)[1:]))