Skip to content

Commit

Permalink
Fix #5 - support leading tab on multi-line header
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-kent committed Nov 13, 2014
1 parent 1bc6834 commit 90dc75e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mailhog/data/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func ContentFromString(data string) *Content {
hdrs := strings.Split(headers, "\r\n")
var lastHdr = ""
for _, hdr := range hdrs {
if lastHdr != "" && strings.HasPrefix(hdr, " ") {
if lastHdr != "" && (strings.HasPrefix(hdr, " ") || strings.HasPrefix(hdr, "\t")) {
h[lastHdr][len(h[lastHdr])-1] = h[lastHdr][len(h[lastHdr])-1] + hdr
} else if strings.Contains(hdr, ": ") {
y := strings.SplitN(hdr, ": ", 2)
Expand Down

0 comments on commit 90dc75e

Please sign in to comment.