Merge branches 'development' and 'development' of github.com:incubaid/herolib into development
This commit is contained in:
@@ -77,16 +77,16 @@ pub fn parse_doc(mut doc elements.Doc) ! {
|
||||
continue
|
||||
}
|
||||
|
||||
if mut llast is elements.Frontmatter || mut llast is elements.Frontmatter2 {
|
||||
if trimmed_line == '---' || trimmed_line == '+++' {
|
||||
parser.next_start_lf()!
|
||||
parser.frontmatter = true
|
||||
continue
|
||||
}
|
||||
llast.content += '${line}\n'
|
||||
parser.next()
|
||||
continue
|
||||
}
|
||||
// if mut llast is elements.Frontmatter || mut llast is elements.Frontmatter2 {
|
||||
// if trimmed_line == '---' || trimmed_line == '+++' {
|
||||
// parser.next_start_lf()!
|
||||
// parser.frontmatter = true
|
||||
// continue
|
||||
// }
|
||||
// llast.content += '${line}\n'
|
||||
// parser.next()
|
||||
// continue
|
||||
// }
|
||||
|
||||
if mut llast is elements.Paragraph {
|
||||
if elements.line_is_list(line) {
|
||||
@@ -110,17 +110,17 @@ pub fn parse_doc(mut doc elements.Doc) ! {
|
||||
continue
|
||||
}
|
||||
|
||||
if line.starts_with('+++') && parser.frontmatter == false {
|
||||
mut e := doc.frontmatter_new(mut &doc, '')
|
||||
parser.next()
|
||||
continue
|
||||
}
|
||||
// if line.starts_with('+++') && parser.frontmatter == false {
|
||||
// mut e := doc.frontmatter_new(mut &doc, '')
|
||||
// parser.next()
|
||||
// continue
|
||||
// }
|
||||
|
||||
if line.starts_with('---') && parser.frontmatter == false {
|
||||
mut e := doc.frontmatter2_new(mut &doc, '')
|
||||
parser.next()
|
||||
continue
|
||||
}
|
||||
// if line.starts_with('---') && parser.frontmatter == false {
|
||||
// mut e := doc.frontmatter2_new(mut &doc, '')
|
||||
// parser.next()
|
||||
// continue
|
||||
// }
|
||||
|
||||
// process headers (# is 35)
|
||||
if line.len > 0 && line[0] == 35 {
|
||||
|
||||
@@ -120,9 +120,6 @@ fn play_pages(mut plbook PlayBook, mut site Site) ! {
|
||||
mypage.slug = p.get_default('slug', '')!
|
||||
mypage.draft = p.get_default_false('draft')
|
||||
mypage.hide_title = p.get_default_false('hide_title')
|
||||
if mypage.title.len > 0 {
|
||||
mypage.hide_title = true
|
||||
}
|
||||
mypage.title_nr = p.get_int_default('title_nr', 0)!
|
||||
|
||||
site.pages << mypage
|
||||
|
||||
Reference in New Issue
Block a user