This commit is contained in:
2025-10-22 09:38:49 +02:00
parent a5f8074411
commit caedf2e2dd
2 changed files with 20 additions and 23 deletions

View File

@@ -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 {

View File

@@ -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