diff --git a/README.md b/README.md index d61726b..07faf19 100644 --- a/README.md +++ b/README.md @@ -103,22 +103,24 @@ terraform: {{ .Title }} [CI link]( {{ .Link }} ) {{ .Message }} {{if .Result}} -
 {{ .Result }}
+      
{{ .Result }}
       
{{end}}
Details (Click me) -
 {{ .Body }}
+
+      
{{ .Body }}
       
apply: template: | {{ .Title }} {{ .Message }} {{if .Result}} -
 {{ .Result }}
+      
{{ .Result }}
       
{{end}}
Details (Click me) -
 {{ .Body }}
+
+      
{{ .Body }}
       
``` @@ -152,22 +154,24 @@ terraform: {{ .Title }} [CI link]( {{ .Link }} ) {{ .Message }} {{if .Result}} -
 {{ .Result }}
+      
{{ .Result }}
       
{{end}}
Details (Click me) -
 {{ .Body }}
+
+      
{{ .Body }}
       
apply: template: | {{ .Title }} {{ .Message }} {{if .Result}} -
 {{ .Result }}
+      
{{ .Result }}
       
{{end}}
Details (Click me) -
 {{ .Body }}
+
+      
{{ .Body }}
       
``` diff --git a/config/config_test.go b/config/config_test.go index ecda5dd..da37a6a 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -50,7 +50,7 @@ func TestLoadFile(t *testing.T) { Template: "", }, Plan: Plan{ - Template: "{{ .Title }}\n{{ .Message }}\n{{if .Result}}\n
 {{ .Result }}\n
\n{{end}}\n
Details (Click me)\n
 {{ .Body }}\n
\n", + Template: "{{ .Title }}\n{{ .Message }}\n{{if .Result}}\n
{{ .Result }}\n
\n{{end}}\n
Details (Click me)\n\n
{{ .Body }}\n
\n", }, Apply: Apply{ Template: "", @@ -90,7 +90,7 @@ func TestLoadFile(t *testing.T) { Template: "", }, Plan: Plan{ - Template: "{{ .Title }}\n{{ .Message }}\n{{if .Result}}\n
 {{ .Result }}\n
\n{{end}}\n
Details (Click me)\n
 {{ .Body }}\n
\n", + Template: "{{ .Title }}\n{{ .Message }}\n{{if .Result}}\n
{{ .Result }}\n
\n{{end}}\n
Details (Click me)\n\n
{{ .Body }}\n
\n", }, Apply: Apply{ Template: "", diff --git a/example.tfnotify.yaml b/example.tfnotify.yaml index b124dcc..867d263 100644 --- a/example.tfnotify.yaml +++ b/example.tfnotify.yaml @@ -11,9 +11,10 @@ terraform: {{ .Title }} {{ .Message }} {{if .Result}} -
 {{ .Result }}
+      
{{ .Result }}
       
{{end}}
Details (Click me) -
 {{ .Body }}
+
+      
{{ .Body }}
       
diff --git a/terraform/template.go b/terraform/template.go index 6c10c0c..ca92f51 100644 --- a/terraform/template.go +++ b/terraform/template.go @@ -27,6 +27,7 @@ const ( {{end}}
Details (Click me) +
{{ .Body }}
 
` @@ -54,6 +55,7 @@ const ( {{end}}
Details (Click me) +
{{ .Body }}
 
` @@ -70,6 +72,7 @@ const ( {{end}}
Details (Click me) +
{{ .Body }}
 
` diff --git a/terraform/template_test.go b/terraform/template_test.go index a6b6461..d093047 100644 --- a/terraform/template_test.go +++ b/terraform/template_test.go @@ -22,6 +22,7 @@ func TestDefaultTemplateExecute(t *testing.T) {
Details (Click me) +

 
`, @@ -39,6 +40,7 @@ message
Details (Click me) +

 
`, @@ -59,6 +61,7 @@ b
Details (Click me) +
c
 
`, @@ -80,6 +83,7 @@ b
Details (Click me) +
c
 
`, @@ -220,6 +224,7 @@ func TestPlanTemplateExecute(t *testing.T) {
Details (Click me) +

 
`, @@ -243,6 +248,7 @@ message
Details (Click me) +
body
 
`, @@ -263,6 +269,7 @@ message
Details (Click me) +
body
 
`, @@ -283,6 +290,7 @@ message
Details (Click me) +
body
 
`, @@ -328,6 +336,7 @@ func TestApplyTemplateExecute(t *testing.T) {
Details (Click me) +

 
`, @@ -351,6 +360,7 @@ message
Details (Click me) +
body
 
`, @@ -371,6 +381,7 @@ message
Details (Click me) +
body
 
`, @@ -391,6 +402,7 @@ message
Details (Click me) +
body
 
`,