From 1bc959fd2f79aefaac4a5222faf47edb31ca5a94 Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Thu, 20 Jun 2024 07:31:35 -0400 Subject: [PATCH] Handle HTML paragraph tags in markdown parser --- src/import/markdown_extract_text.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/import/markdown_extract_text.cpp b/src/import/markdown_extract_text.cpp index c587a8df..548e09cd 100644 --- a/src/import/markdown_extract_text.cpp +++ b/src/import/markdown_extract_text.cpp @@ -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"
", 3) == 0) + { + m_currentStart += 3; + previousChar = L'\n'; + add_characters(L"\n\n"); + continue; + } + else if (!isEscaping && std::wcsncmp(m_currentStart, L"
", 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"