Skip to content

Commit

Permalink
fix br and empty w:p
Browse files Browse the repository at this point in the history
  • Loading branch information
SylaiseElvenan committed Nov 25, 2020
1 parent 3e86ee8 commit e10d655
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions HtmlFile2/htmlfile2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,7 @@ class CHtmlFile2_Private
std::wstring sText = m_oLightReader.GetText();
size_t find = sText.find_first_not_of(L" \n\t\r");
if(find == std::wstring::npos)
{
if(sText.find(L' ') != std::wstring::npos)
sText = L" ";
else
return;
}
return;
else if(!(find == 1 && sText.front() == L' '))
sText.erase(0, find);

Expand Down Expand Up @@ -638,7 +633,7 @@ class CHtmlFile2_Private
else if(sName == L"br")
{
wrP(oXml, sSelectors, oTS, bWasP);
oXml->WriteString(L"<w:r><w:br/></w:r>");
oXml->WriteString(L"<w:r><w:tab/><w:br/></w:r>");
}
else if(sName == L"center")
{
Expand Down

0 comments on commit e10d655

Please sign in to comment.