summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/templates/frontmatter.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/templates/frontmatter.go')
-rw-r--r--modules/caddyhttp/templates/frontmatter.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/caddyhttp/templates/frontmatter.go b/modules/caddyhttp/templates/frontmatter.go
index d6b6d0e..d781c7b 100644
--- a/modules/caddyhttp/templates/frontmatter.go
+++ b/modules/caddyhttp/templates/frontmatter.go
@@ -30,6 +30,9 @@ func extractFrontMatter(input string) (map[string]interface{}, string, error) {
}
firstLine := input[firstLineStart:firstLineEnd]
+ // ensure residue windows carriage return byte is removed
+ firstLine = strings.TrimSpace(firstLine)
+
// see what kind of front matter there is, if any
var closingFence string
var fmParser func([]byte) (map[string]interface{}, error)