mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -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
@ -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…
Reference in New Issue
Block a user