diff options
author | Henrique Dias <hacdias@gmail.com> | 2016-04-26 21:21:15 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-04-26 22:28:47 +0200 |
commit | 16b71bbbb4c283f29e6e757dbf1fc304703704a9 (patch) | |
tree | d00ea6843ef01808e5ec35cd53a645975f6f7a0d | |
parent | c5723a8931e58a3250590e055b0e6b126c680691 (diff) |
Export "detectFrontMatter" to fix caddy-hugo
Closes #2108
-rw-r--r-- | parser/frontmatter.go | 2 | ||||
-rw-r--r-- | parser/page.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/parser/frontmatter.go b/parser/frontmatter.go index d12a7b6d6..b185526d7 100644 --- a/parser/frontmatter.go +++ b/parser/frontmatter.go @@ -149,7 +149,7 @@ func FormatSanitize(kind string) string { } } -func detectFrontMatter(mark rune) (f *frontmatterType) { +func DetectFrontMatter(mark rune) (f *frontmatterType) { switch mark { case '-': return &frontmatterType{[]byte(YAMLDelim), []byte(YAMLDelim), HandleYAMLMetaData, false} diff --git a/parser/page.go b/parser/page.go index 5092caddc..ed3f64010 100644 --- a/parser/page.go +++ b/parser/page.go @@ -90,7 +90,7 @@ func (p *page) Metadata() (meta interface{}, err error) { frontmatter := p.FrontMatter() if len(frontmatter) != 0 { - fm := detectFrontMatter(rune(frontmatter[0])) + fm := DetectFrontMatter(rune(frontmatter[0])) meta, err = fm.Parse(frontmatter) if err != nil { return |