Merge pull request #32 from ernsheong/alignment
Fix English spelling of "Alignment"
This commit is contained in:
commit
23ab47deb5
|
@ -188,7 +188,7 @@ The following will inject the table into the e-mail:
|
||||||
{{ with $width }}
|
{{ with $width }}
|
||||||
width="{{ . }}"
|
width="{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $align := index .CustomAlignement $entry.Key }}
|
{{ $align := index .CustomAlignment $entry.Key }}
|
||||||
{{ with $align }}
|
{{ with $align }}
|
||||||
style="text-align:{{ . }}"
|
style="text-align:{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -203,7 +203,7 @@ The following will inject the table into the e-mail:
|
||||||
{{ range $cell := $row }}
|
{{ range $cell := $row }}
|
||||||
<td
|
<td
|
||||||
{{ with $columns }}
|
{{ with $columns }}
|
||||||
{{ $align := index .CustomAlignement $cell.Key }}
|
{{ $align := index .CustomAlignment $cell.Key }}
|
||||||
{{ with $align }}
|
{{ with $align }}
|
||||||
style="text-align:{{ . }}"
|
style="text-align:{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -262,7 +262,7 @@ email := hermes.Email{
|
||||||
"Item": "20%",
|
"Item": "20%",
|
||||||
"Price": "15%",
|
"Price": "15%",
|
||||||
},
|
},
|
||||||
CustomAlignement: map[string]string{
|
CustomAlignment: map[string]string{
|
||||||
"Price": "right",
|
"Price": "right",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -325,7 +325,7 @@ func (dt *Default) HTMLTemplate() string {
|
||||||
{{ with $width }}
|
{{ with $width }}
|
||||||
width="{{ . }}"
|
width="{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $align := index .CustomAlignement $entry.Key }}
|
{{ $align := index .CustomAlignment $entry.Key }}
|
||||||
{{ with $align }}
|
{{ with $align }}
|
||||||
style="text-align:{{ . }}"
|
style="text-align:{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -340,7 +340,7 @@ func (dt *Default) HTMLTemplate() string {
|
||||||
{{ range $cell := $row }}
|
{{ range $cell := $row }}
|
||||||
<td
|
<td
|
||||||
{{ with $columns }}
|
{{ with $columns }}
|
||||||
{{ $align := index .CustomAlignement $cell.Key }}
|
{{ $align := index .CustomAlignment $cell.Key }}
|
||||||
{{ with $align }}
|
{{ with $align }}
|
||||||
style="text-align:{{ . }}"
|
style="text-align:{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -36,7 +36,7 @@ func (r *receipt) Email() hermes.Email {
|
||||||
"Item": "20%",
|
"Item": "20%",
|
||||||
"Price": "15%",
|
"Price": "15%",
|
||||||
},
|
},
|
||||||
CustomAlignement: map[string]string{
|
CustomAlignment: map[string]string{
|
||||||
"Price": "right",
|
"Price": "right",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
4
flat.go
4
flat.go
|
@ -325,7 +325,7 @@ func (dt *Flat) HTMLTemplate() string {
|
||||||
{{ with $width }}
|
{{ with $width }}
|
||||||
width="{{ . }}"
|
width="{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $align := index .CustomAlignement $entry.Key }}
|
{{ $align := index .CustomAlignment $entry.Key }}
|
||||||
{{ with $align }}
|
{{ with $align }}
|
||||||
style="text-align:{{ . }}"
|
style="text-align:{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -340,7 +340,7 @@ func (dt *Flat) HTMLTemplate() string {
|
||||||
{{ range $cell := $row }}
|
{{ range $cell := $row }}
|
||||||
<td
|
<td
|
||||||
{{ with $columns }}
|
{{ with $columns }}
|
||||||
{{ $align := index .CustomAlignement $cell.Key }}
|
{{ $align := index .CustomAlignment $cell.Key }}
|
||||||
{{ with $align }}
|
{{ with $align }}
|
||||||
style="text-align:{{ . }}"
|
style="text-align:{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -93,7 +93,7 @@ type Table struct {
|
||||||
// Columns contains meta-data for the different columns
|
// Columns contains meta-data for the different columns
|
||||||
type Columns struct {
|
type Columns struct {
|
||||||
CustomWidth map[string]string
|
CustomWidth map[string]string
|
||||||
CustomAlignement map[string]string
|
CustomAlignment map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action is an action the user can do on the email (click on a button)
|
// Action is an action the user can do on the email (click on a button)
|
||||||
|
|
|
@ -73,7 +73,7 @@ func (ed *SimpleExample) getExample() (Hermes, Email) {
|
||||||
"Item": "20%",
|
"Item": "20%",
|
||||||
"Price": "15%",
|
"Price": "15%",
|
||||||
},
|
},
|
||||||
CustomAlignement: map[string]string{
|
CustomAlignment: map[string]string{
|
||||||
"Price": "right",
|
"Price": "right",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -457,7 +457,7 @@ func TestHermes_Default(t *testing.T) {
|
||||||
assert.Empty(t, email.Body.Outros)
|
assert.Empty(t, email.Body.Outros)
|
||||||
assert.Empty(t, email.Body.Table.Data)
|
assert.Empty(t, email.Body.Table.Data)
|
||||||
assert.Empty(t, email.Body.Table.Columns.CustomWidth)
|
assert.Empty(t, email.Body.Table.Columns.CustomWidth)
|
||||||
assert.Empty(t, email.Body.Table.Columns.CustomAlignement)
|
assert.Empty(t, email.Body.Table.Columns.CustomAlignment)
|
||||||
assert.Empty(t, string(email.Body.FreeMarkdown))
|
assert.Empty(t, string(email.Body.FreeMarkdown))
|
||||||
|
|
||||||
assert.Equal(t, email.Body.Greeting, "Hi")
|
assert.Equal(t, email.Body.Greeting, "Hi")
|
||||||
|
|
Loading…
Reference in New Issue