Skip to content

Commit

Permalink
Handle self-terminator BR in HTML importer
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Dec 31, 2023
1 parent 685892d commit ec8a6f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/import/html_extract_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,8 @@ namespace lily_of_the_valley
string_util::strnicmp(pageBreakValue.c_str(), L"right", 5) == 0))
{ add_character(L'\f'); }
}
else if (currentElement == L"br")
// break (handle self-terminating ones the same way)
else if (currentElement == L"br" || currentElement == L"br/")
{ add_character(L'\n'); }
// or end of a section that is like a paragraph
else if (remainingTextLength >= 3 && start[0] == L'<' && start[1] == L'/')
Expand Down

0 comments on commit ec8a6f7

Please sign in to comment.