I#1679 - e-convert.js: Do not re-wrap gmail_quote paragraphs
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1679
This commit is contained in:
@ -912,7 +912,25 @@ EvoConvert.processNode = function(node, normalDivWidth, quoteLevel)
|
||||
useDefaultWidth = true;
|
||||
}
|
||||
|
||||
if (useDefaultWidth && normalDivWidth > 0) {
|
||||
var childrenWillWrap = true;
|
||||
if (!node.classList.contains("gmail_quote")) {
|
||||
var ii;
|
||||
for (ii = 0; childrenWillWrap && ii < node.childNodes.length; ii++) {
|
||||
var child = node.childNodes.item(ii);
|
||||
childrenWillWrap = (child.nodeType == child.ELEMENT_NODE &&
|
||||
(child.tagName == "DIV" ||
|
||||
child.tagName == "P" ||
|
||||
child.tagName == "PRE" ||
|
||||
child.tagName == "BLOCKQUOTE" ||
|
||||
child.tagName == "BR")) ||
|
||||
(child.nodeType == child.TEXT_NODE &&
|
||||
EvoConvert.RemoveInsignificantNewLines(child, true).trim().length == 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (childrenWillWrap) {
|
||||
width = -1;
|
||||
} else if (useDefaultWidth && normalDivWidth > 0) {
|
||||
width = normalDivWidth - (quoteLevel * 2);
|
||||
|
||||
if (width < EvoConvert.MIN_PARAGRAPH_WIDTH)
|
||||
|
Reference in New Issue
Block a user