Fix MarkdownParser paragraph interpretation
Fixed a bug that added multiple paragraph HTML tags on non-paragraph new lines.
This commit is contained in:
parent
9f94172050
commit
4c47a02f61
|
@ -57,6 +57,7 @@ std::string make_html(std::filesystem::path const &path) {
|
|||
if (tag_p && buf[0] == '\n') {
|
||||
// Empty newline; end paragraph.
|
||||
html += "</p>\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 += "<p>",
|
||||
tag_p = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue