mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 14:12:43 -04:00
Fix: empty line duplication bug
to reproduce: hit: a<enter><enter>b the result will be: a<br><br><br>b the empty line is two lines high
This commit is contained in:
parent
caa97cce70
commit
0402e53f15
1 changed files with 2 additions and 1 deletions
|
@ -681,7 +681,8 @@ static void optimizeHtml(QDomDocument& doc, QDomElement& currentElement, unsigne
|
||||||
// remove Qt standard <p> or empty <p>
|
// remove Qt standard <p> or empty <p>
|
||||||
index += element.childNodes().length();
|
index += element.childNodes().length();
|
||||||
removeElement(currentElement, element);
|
removeElement(currentElement, element);
|
||||||
addBR = true;
|
// do not add extra <br> after empty paragraph, the paragraph already contains one
|
||||||
|
addBR = ! style.startsWith("-qt-paragraph-type:empty");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue