From 90dc75e3925ed21e660c3126d20d2788ecbd54f9 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Thu, 13 Nov 2014 18:17:00 +0000 Subject: [PATCH] Fix #5 - support leading tab on multi-line header --- mailhog/data/message.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailhog/data/message.go b/mailhog/data/message.go index 3e093e39..75edea1c 100644 --- a/mailhog/data/message.go +++ b/mailhog/data/message.go @@ -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)