diff --git a/src/MarkdownParser.cxx b/src/MarkdownParser.cxx index 3652078..f1ebc4e 100644 --- a/src/MarkdownParser.cxx +++ b/src/MarkdownParser.cxx @@ -57,6 +57,7 @@ std::string make_html(std::filesystem::path const &path) { if (tag_p && buf[0] == '\n') { // Empty newline; end paragraph. html += "

\n"; + tag_p = false; continue; } @@ -83,7 +84,7 @@ std::string make_html(std::filesystem::path const &path) { // Start paragraph if newline and no // special characters were matched. - if (newline && x == 0 && c != '#') + if (!tag_p && newline && x == 0 && c != '#') html += "

", tag_p = true;