Skip to content

Commit

Permalink
Handle HTML paragraph tags in markdown parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Jun 20, 2024
1 parent caf981b commit 1bc959f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/import/markdown_extract_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,20 @@ lily_of_the_valley::markdown_extract_text::operator()(const std::wstring_view md
m_currentStart = endOfTag + 3;
continue;
}
else if (!isEscaping && std::wcsncmp(m_currentStart, L"<p>", 3) == 0)
{
m_currentStart += 3;
previousChar = L'\n';
add_characters(L"\n\n");
continue;
}
else if (!isEscaping && std::wcsncmp(m_currentStart, L"</p>", 4) == 0)
{
m_currentStart += 4;
previousChar = L'\n';
add_characters(L"\n\n");
continue;
}
// newline hacks found in tables (just replace with space to keep the table structure).
else if (!isEscaping && std::wcsncmp(m_currentStart, L"<br>\\linebreak", 14) == 0)
{
Expand Down

0 comments on commit 1bc959f

Please sign in to comment.