Skip to content

Commit 5bacfdd

Browse files
authored
Merge pull request #23 from mdb/mdb/omit-heading-and-desc
omit heading and/or description if an empty string is specified
2 parents f22e37e + a1a18e8 commit 5bacfdd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = 0.1.8
1+
VERSION = 0.1.9
22
SOURCE = ./...
33

44
.DEFAULT_GOAL := build

templates/html.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<h2>{{ .Heading }}</h2>
2-
<p>{{ .Description }}</p>
1+
{{ if .Heading }}<h2>{{ .Heading }}</h2>{{ end }}
2+
{{ if .Description }}<p>{{ .Description }}</p>{{ end }}
33
<table>
44
<tr>
55
<th>Output</th>

templates/markdown.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## {{ .Heading }}
1+
{{ if .Heading }}## {{ .Heading }}{{ end }}
22

3-
{{ .Description }}
3+
{{ if .Description }}{{ .Description }}{{ end }}
44

55
| Output | Value | Type
66
| --- | --- | --- |

0 commit comments

Comments
 (0)