Export "detectFrontMatter" to fix caddy-hugo
authorHenrique Dias <hacdias@gmail.com>
Tue, 26 Apr 2016 20:21:15 +0000 (21:21 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 26 Apr 2016 20:28:47 +0000 (22:28 +0200)
Closes #2108

parser/frontmatter.go
parser/page.go

index d12a7b6d6dd923e8562dd9ad3f2b365b1aefc6d3..b185526d7cbb4e76393f9741a2564c5b1be64baf 100644 (file)
@@ -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}
index 5092caddcc63b446e4f133465cbd8f72f0b1e307..ed3f640107c8e726a54235bb1cf3aa87ed17bf2c 100644 (file)
@@ -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