Update parser.v

This commit is contained in:
2026-07-11 19:55:19 +02:00
parent 8e8d72489d
commit 7cd13a1db3
+4 -7
View File
@@ -29,19 +29,16 @@ fn parse(lines []string) string {
lvl, mut text := parse_header(trimmed) lvl, mut text := parse_header(trimmed)
if lvl > 0 { is_header := lvl > 0
output += '<h' + lvl.str() + '>'
}
if lvl > 0 { if is_header {
output += '<h' + lvl.str() + '>'
output += text + '</h' + lvl.str() + '>' output += text + '</h' + lvl.str() + '>'
} else { } else {
output += text output += text
}
if lvl == 0 {
output += '<br>' output += '<br>'
} }
output += '\n' output += '\n'
} }