Skip to content

Commit

Permalink
Handle HTML span in markdown text
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Jun 17, 2024
1 parent 40bc19d commit caf981b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/import/markdown_extract_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bool lily_of_the_valley::markdown_extract_text::parse_styled_text(wchar_t& previ
}
// if a bold tag (**), then move to the matching (terminating) tag
while (currentTag == L"**" && (std::next(endOfTag) < m_currentEndSentinel) &&
*std::next(endOfTag) != L'*')
*std::next(endOfTag) != L'*')
{
std::advance(endOfTag, 1);
endOfTag = string_util::find_unescaped_char_same_line_n(
Expand Down Expand Up @@ -803,12 +803,13 @@ lily_of_the_valley::markdown_extract_text::operator()(const std::wstring_view md
}
}
else if (!isEscaping && std::next(m_currentStart) < m_currentEndSentinel &&
(m_currentStart[1] == L'/' || m_currentStart[1] == L'p' ||
(*std::next(m_currentStart) == L'/' || *std::next(m_currentStart) == L'p' ||
std::wcsncmp(std::next(m_currentStart), L"a ", 2) == 0 ||
std::wcsncmp(std::next(m_currentStart), L"b>", 2) == 0 ||
std::wcsncmp(std::next(m_currentStart), L"i>", 2) == 0 ||
std::wcsncmp(std::next(m_currentStart), L"u>", 2) == 0 ||
std::wcsncmp(std::next(m_currentStart), L"code", 4) == 0 ||
std::wcsncmp(std::next(m_currentStart), L"span", 4) == 0 ||
std::wcsncmp(std::next(m_currentStart), L"strong", 6) == 0 ||
std::wcsncmp(std::next(m_currentStart), L"div", 3) == 0 ||
std::wcsncmp(std::next(m_currentStart), L"dl>", 3) == 0 ||
Expand Down

0 comments on commit caf981b

Please sign in to comment.