From ed64d2fb11b4833a8dcbe29225f90bf6462dc8ad Mon Sep 17 00:00:00 2001 From: clsr Date: Thu, 24 Aug 2017 17:10:26 +0200 Subject: Update to cnm-go 0.2.0 --- templates/content.html | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'templates/content.html') diff --git a/templates/content.html b/templates/content.html index 73f18c7..4616a10 100644 --- a/templates/content.html +++ b/templates/content.html @@ -37,7 +37,7 @@ {{- if eq .Name "table" -}} - {{- range .Rows -}} + {{- range .Children -}} {{- template "content.html" . -}} {{- end -}}
@@ -79,19 +79,15 @@ {{- end -}} {{- if eq .Name "text" -}} - {{- if eq .Format "" "plain"}}{{range .Contents.Paragraphs -}} -

{{.}}

- {{- end}}{{end -}} - {{- if eq .Format "fmt" -}} - {{- range .Contents.Paragraphs -}} - {{- cnmfmt . -}} - {{- end -}} - {{- end -}} - {{- if not (eq .Format "" "plain" "fmt") -}} -
{{.Contents.Text}}
+ {{- if eq .Format "" "plain" "pre" "fmt" -}} + {{- if eq .Format "" "plain"}}{{range .Contents.Paragraphs}}

{{.}}

{{end}}{{end -}} + {{- if eq .Format "pre"}}
{{.Contents.Text}}
{{end -}} + {{- if eq .Format "fmt"}}{{range .Contents.Paragraphs}}{{cnmfmt .}}{{end}}{{end -}} + {{- else -}} +
{{.Contents.Text}}
{{- end -}} {{- end -}} {{- if eq .Name "raw" -}} -
{{.Contents}}
+
{{.Contents.Text}}
{{- end -}} -- cgit