[evolution/wip/webkit2] EHTMLEditorView - Some empty new lines in a quoted content could be lost
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] EHTMLEditorView - Some empty new lines in a quoted content could be lost
- Date: Wed, 29 Jun 2016 15:05:03 +0000 (UTC)
commit b47fbed0fc8a7be07dea090d9cdb02b506ac0ab0
Author: Tomas Popela <tpopela redhat com>
Date: Wed Jun 29 16:02:38 2016 +0200
EHTMLEditorView - Some empty new lines in a quoted content could be lost
.../web-extension/e-editor-dom-functions.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index efd942a..b5a588f 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -16163,6 +16163,7 @@ process_block_to_block (EEditorPage *editor_page,
gboolean quoted = FALSE;
gboolean empty = FALSE;
gchar *content;
+ gint citation_level = 0;
WebKitDOMNode *child;
WebKitDOMElement *element;
@@ -16255,8 +16256,6 @@ process_block_to_block (EEditorPage *editor_page,
remove_node (block);
if (!next_block && !after_selection_end) {
- gint citation_level;
-
citation_level = selection_get_citation_level (WEBKIT_DOM_NODE (element));
if (citation_level > 0) {
@@ -16268,8 +16267,6 @@ process_block_to_block (EEditorPage *editor_page,
block = next_block;
if (!html_mode && format == E_CONTENT_EDITOR_BLOCK_FORMAT_PARAGRAPH) {
- gint citation_level;
-
citation_level = selection_get_citation_level (WEBKIT_DOM_NODE (element));
if (citation_level > 0) {
@@ -16285,8 +16282,13 @@ process_block_to_block (EEditorPage *editor_page,
}
}
- if (!html_mode && quoted)
- e_editor_dom_quote_plain_text_element (editor_page, element);
+ if (!html_mode && quoted) {
+ if (citation_level > 0)
+ e_editor_dom_quote_plain_text_element_after_wrapping (
+ editor_page, element, citation_level);
+ else
+ e_editor_dom_quote_plain_text_element (editor_page, element);
+ }
}
return after_selection_end;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]