fixed some error formatting
This commit is contained in:
parent
af81617db5
commit
587085df86
1 changed files with 2 additions and 4 deletions
|
@ -40,7 +40,7 @@ func processWithYaml(f []byte) (Metadata, []byte, error) {
|
|||
// Separate YAML from rest of document
|
||||
split := strings.SplitN(normalized, "---\n", 3)
|
||||
if len(split) < 3 {
|
||||
return nil, nil, fmt.Errorf("Invalid frontmatter format.")
|
||||
return nil, nil, fmt.Errorf("invalid frontmatter format")
|
||||
}
|
||||
var meta Metadata
|
||||
// Parse YAML
|
||||
|
@ -65,10 +65,8 @@ func processFrontmatter(p string) (Metadata, error) {
|
|||
}
|
||||
// Separate YAML from rest of document
|
||||
split := strings.SplitN(normalized, "---\n", 3)
|
||||
// __AUTO_GENERATED_PRINT_VAR_START__
|
||||
fmt.Println(fmt.Sprintf("processFrontmatter split: %v", split)) // __AUTO_GENERATED_PRINT_VAR_END__
|
||||
if len(split) < 3 {
|
||||
return nil, fmt.Errorf("Invalid frontmatter format.")
|
||||
return nil, fmt.Errorf("invalid frontmatter format")
|
||||
}
|
||||
var meta Metadata
|
||||
// Parse YAML
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue