[evolution/wip/webkit2] EHTMLEditorView - Don't add a new line for the empty list when generating a plain text version of th
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] EHTMLEditorView - Don't add a new line for the empty list when generating a plain text version of th
- Date: Wed, 29 Jun 2016 15:08:05 +0000 (UTC)
commit 4d0ae2fe775d798106f2fcf98a221c60d82a64d0
Author: Tomas Popela <tpopela redhat com>
Date: Wed Jun 29 17:01:48 2016 +0200
EHTMLEditorView - Don't add a new line for the empty list when generating a plain text version of the
content
.../web-extension/e-editor-dom-functions.c | 5 ++++-
1 files changed, 4 insertions(+), 1 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 0ba9d50..607a435 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -6785,6 +6785,7 @@ process_list_to_plain_text (EEditorPage *editor_page,
EContentEditorBlockFormat format;
EContentEditorAlignment alignment;
gint counter = 1;
+ gboolean empty = TRUE;
gchar *indent_per_level;
WebKitDOMNode *item;
gint word_wrap_length;
@@ -6808,6 +6809,8 @@ process_list_to_plain_text (EEditorPage *editor_page,
WebKitDOMElement *wrapped;
GString *item_value = g_string_new ("");
+ empty = FALSE;
+
alignment = e_editor_dom_get_list_alignment_from_node (
WEBKIT_DOM_NODE (item));
@@ -7005,7 +7008,7 @@ process_list_to_plain_text (EEditorPage *editor_page,
}
}
- if (webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (element)))
+ if (webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (element)) && !empty)
g_string_append (output, "\n");
g_free (indent_per_level);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]