diff --git a/src/parser.v b/src/parser.v index febea2c..17370be 100644 --- a/src/parser.v +++ b/src/parser.v @@ -29,19 +29,16 @@ fn parse(lines []string) string { lvl, mut text := parse_header(trimmed) - if lvl > 0 { - output += '' - } + is_header := lvl > 0 - if lvl > 0 { + if is_header { + output += '' output += text + '' } else { output += text - } - - if lvl == 0 { output += '
' } + output += '\n' }