[evolution/wip/mcrha/webkit-jsc-api] test-html-editor-units: Correct the /cite/html2plain and a related change in the e-convert.js
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/mcrha/webkit-jsc-api] test-html-editor-units: Correct the /cite/html2plain and a related change in the e-convert.js
- Date: Tue, 17 Mar 2020 11:45:57 +0000 (UTC)
commit 2192441ab4331ad06a647464e5ccb08a0c655de4
Author: Milan Crha <mcrha redhat com>
Date: Tue Mar 17 12:47:04 2020 +0100
test-html-editor-units: Correct the /cite/html2plain and a related change in the e-convert.js
data/webkit/e-convert.js | 2 +-
src/e-util/test-html-editor-units.c | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/data/webkit/e-convert.js b/data/webkit/e-convert.js
index e952921730..ab77ccb67a 100644
--- a/data/webkit/e-convert.js
+++ b/data/webkit/e-convert.js
@@ -647,7 +647,7 @@ EvoConvert.processNode = function(node, normalDivWidth, quoteLevel)
if (node.nodeType == node.TEXT_NODE) {
str = node.nodeValue;
} else if (node.nodeType == node.ELEMENT_NODE) {
- if (node.hidden)
+ if (node.hidden || (node.tagName == "SPAN" && node.classList.contains("-x-evo-quoted")))
return str;
var style = EvoConvert.getComputedOrNodeStyle(node), ltr, align, indent, whiteSpace;
diff --git a/src/e-util/test-html-editor-units.c b/src/e-util/test-html-editor-units.c
index 83a316526b..dc10c00411 100644
--- a/src/e-util/test-html-editor-units.c
+++ b/src/e-util/test-html-editor-units.c
@@ -4592,16 +4592,16 @@ test_cite_html2plain (TestFixture *fixture)
test_utils_insert_content (fixture,
"<html><head></head><body>"
"<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
- "<div data-evo-paragraph=\"\">level 1</div>"
- "<div data-evo-paragraph=\"\"><br></div>"
- "<div data-evo-paragraph=\"\">level 1</div>"
+ "<div>level 1</div>"
+ "<div><br></div>"
+ "<div>level 1</div>"
"<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
- "<div data-evo-paragraph=\"\">level 2</div>"
+ "<div>level 2</div>"
"</blockquote>"
- "<div data-evo-paragraph=\"\">back in level 1</div>"
+ "<div>back in level 1</div>"
"</blockquote>"
- "<div data-evo-paragraph=\"\"><br></div>"
- "<div data-evo-paragraph=\"\">out of the citation</div>"
+ "<div><br></div>"
+ "<div>out of the citation</div>"
"</body></html>",
E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
@@ -4617,7 +4617,7 @@ test_cite_html2plain (TestFixture *fixture)
"> > level 2\n"
"> back in level 1\n"
"\n"
- "out of the citation")) {
+ "out of the citation\n")) {
g_test_fail ();
return;
}
@@ -4631,7 +4631,7 @@ test_cite_html2plain (TestFixture *fixture)
"> > level 2\n"
"> back in level 1\n"
"\n"
- "out of the citation"))
+ "out of the citation\n"))
g_test_fail ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]