Skip to content

Commit

Permalink
Merge pull request matcornic#32 from ernsheong/alignment
Browse files Browse the repository at this point in the history
Fix English spelling of "Alignment"
  • Loading branch information
matcornic authored Jan 29, 2018
2 parents 535ed84 + 2ff2e74 commit 23ab47d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ The following will inject the table into the e-mail:
{{ with $width }}
width="{{ . }}"
{{ end }}
{{ $align := index .CustomAlignement $entry.Key }}
{{ $align := index .CustomAlignment $entry.Key }}
{{ with $align }}
style="text-align:{{ . }}"
{{ end }}
Expand All @@ -203,7 +203,7 @@ The following will inject the table into the e-mail:
{{ range $cell := $row }}
<td
{{ with $columns }}
{{ $align := index .CustomAlignement $cell.Key }}
{{ $align := index .CustomAlignment $cell.Key }}
{{ with $align }}
style="text-align:{{ . }}"
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ email := hermes.Email{
"Item": "20%",
"Price": "15%",
},
CustomAlignement: map[string]string{
CustomAlignment: map[string]string{
"Price": "right",
},
},
Expand Down
4 changes: 2 additions & 2 deletions default.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (dt *Default) HTMLTemplate() string {
{{ with $width }}
width="{{ . }}"
{{ end }}
{{ $align := index .CustomAlignement $entry.Key }}
{{ $align := index .CustomAlignment $entry.Key }}
{{ with $align }}
style="text-align:{{ . }}"
{{ end }}
Expand All @@ -340,7 +340,7 @@ func (dt *Default) HTMLTemplate() string {
{{ range $cell := $row }}
<td
{{ with $columns }}
{{ $align := index .CustomAlignement $cell.Key }}
{{ $align := index .CustomAlignment $cell.Key }}
{{ with $align }}
style="text-align:{{ . }}"
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion examples/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (r *receipt) Email() hermes.Email {
"Item": "20%",
"Price": "15%",
},
CustomAlignement: map[string]string{
CustomAlignment: map[string]string{
"Price": "right",
},
},
Expand Down
4 changes: 2 additions & 2 deletions flat.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (dt *Flat) HTMLTemplate() string {
{{ with $width }}
width="{{ . }}"
{{ end }}
{{ $align := index .CustomAlignement $entry.Key }}
{{ $align := index .CustomAlignment $entry.Key }}
{{ with $align }}
style="text-align:{{ . }}"
{{ end }}
Expand All @@ -340,7 +340,7 @@ func (dt *Flat) HTMLTemplate() string {
{{ range $cell := $row }}
<td
{{ with $columns }}
{{ $align := index .CustomAlignement $cell.Key }}
{{ $align := index .CustomAlignment $cell.Key }}
{{ with $align }}
style="text-align:{{ . }}"
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions hermes.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ type Table struct {

// Columns contains meta-data for the different columns
type Columns struct {
CustomWidth map[string]string
CustomAlignement map[string]string
CustomWidth map[string]string
CustomAlignment map[string]string
}

// Action is an action the user can do on the email (click on a button)
Expand Down
4 changes: 2 additions & 2 deletions hermes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (ed *SimpleExample) getExample() (Hermes, Email) {
"Item": "20%",
"Price": "15%",
},
CustomAlignement: map[string]string{
CustomAlignment: map[string]string{
"Price": "right",
},
},
Expand Down Expand Up @@ -457,7 +457,7 @@ func TestHermes_Default(t *testing.T) {
assert.Empty(t, email.Body.Outros)
assert.Empty(t, email.Body.Table.Data)
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.Equal(t, email.Body.Greeting, "Hi")
Expand Down

0 comments on commit 23ab47d

Please sign in to comment.