Update parser.v
This commit is contained in:
+4
-7
@@ -29,19 +29,16 @@ fn parse(lines []string) string {
|
||||
|
||||
lvl, mut text := parse_header(trimmed)
|
||||
|
||||
if lvl > 0 {
|
||||
output += '<h' + lvl.str() + '>'
|
||||
}
|
||||
is_header := lvl > 0
|
||||
|
||||
if lvl > 0 {
|
||||
if is_header {
|
||||
output += '<h' + lvl.str() + '>'
|
||||
output += text + '</h' + lvl.str() + '>'
|
||||
} else {
|
||||
output += text
|
||||
}
|
||||
|
||||
if lvl == 0 {
|
||||
output += '<br>'
|
||||
}
|
||||
|
||||
output += '\n'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user