Skip to content

Commit

Permalink
Fixed YAML config's page loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
darccio committed Apr 20, 2016
1 parent 9f75967 commit 552e222
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,11 @@ func (gen *Generator) getTitle(doc *goquery.Document) (title string) {
func (gen *Generator) extractPageConfig(doc *goquery.Document) (config map[interface{}]interface{}, err error) {
var comment *html5.Node
for _, child := range doc.Nodes {
if child.Type == html5.CommentNode {
comment = child
if child.FirstChild == nil {
continue
}
if child.FirstChild.Type == html5.CommentNode {
comment = child.FirstChild
break
}
}
Expand Down

0 comments on commit 552e222

Please sign in to comment.