From c0fbf11f843af84e8891a708c4d217dd6c523473 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 6 May 2024 10:14:17 +0200 Subject: feat: render markdown examples --- frontend/templates/blocks/options.gotmpl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'frontend/templates/blocks/options.gotmpl') diff --git a/frontend/templates/blocks/options.gotmpl b/frontend/templates/blocks/options.gotmpl index 89c6f33..a4c4f12 100644 --- a/frontend/templates/blocks/options.gotmpl +++ b/frontend/templates/blocks/options.gotmpl @@ -5,7 +5,7 @@ {{ .Option }}

- {{ HTML .Description.HTML }} + {{ markdown .Description }}

{{- with .Type }} @@ -15,18 +15,26 @@ {{- with .Default }}
Default
-
{{ .Text }}
+ {{- if .Markdown }} + {{ .Markdown }} + {{- else }} +
{{ .Text }}
+ {{- end }}
{{- end }} {{- with .Example }} - {{- if .Text }} + {{- if or .Text .Markdown }}
Example
-
{{ .Text }}
+ {{- if .Markdown }} + {{ .Markdown }} + {{- else }} +
{{ .Text }}
+ {{- end }}
{{- end }} {{- end }} - {{- with .RelatedPackages.HTML }} + {{- with .RelatedPackages }}
Related Packages
{{ . }}
{{- end }} -- cgit 1.4.1