summaryrefslogtreecommitdiff
path: root/gemtext/mdconv/convert_test.go
diff options
context:
space:
mode:
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:]))