diff options
author | Alan Pearce | 2024-05-06 10:14:17 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-06 10:14:17 +0200 |
commit | c0fbf11f843af84e8891a708c4d217dd6c523473 (patch) | |
tree | 1fca048be6f784dd895d2c2d9ff09200d5d610fd /frontend/templates | |
parent | 7d08b696e9ab6de61c53a5dc9153595a5a8a6d98 (diff) | |
download | searchix-c0fbf11f843af84e8891a708c4d217dd6c523473.tar.lz searchix-c0fbf11f843af84e8891a708c4d217dd6c523473.tar.zst searchix-c0fbf11f843af84e8891a708c4d217dd6c523473.zip |
feat: render markdown examples
Diffstat (limited to 'frontend/templates')
-rw-r--r-- | frontend/templates/blocks/options.gotmpl | 18 |
1 files changed, 13 insertions, 5 deletions
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 }} </summary> <p> - {{ HTML .Description.HTML }} + {{ markdown .Description }} </p> <dl> {{- with .Type }} @@ -15,18 +15,26 @@ {{- with .Default }} <dt>Default</dt> <dd> - <pre><code>{{ .Text }}</code></pre> + {{- if .Markdown }} + {{ .Markdown }} + {{- else }} + <pre><code>{{ .Text }}</code></pre> + {{- end }} </dd> {{- end }} {{- with .Example }} - {{- if .Text }} + {{- if or .Text .Markdown }} <dt>Example</dt> <dd> - <pre><code>{{ .Text }}</code></pre> + {{- if .Markdown }} + {{ .Markdown }} + {{- else }} + <pre><code>{{ .Text }}</code></pre> + {{- end }} </dd> {{- end }} {{- end }} - {{- with .RelatedPackages.HTML }} + {{- with .RelatedPackages }} <dt>Related Packages</dt> <dd>{{ . }}</dd> {{- end }} |