[evolution] EHTMLEditorView - Avoid extra new line when quoting the text
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorView - Avoid extra new line when quoting the text
- Date: Fri, 5 Sep 2014 11:54:42 +0000 (UTC)
commit fa55238d1ebf5e454d66858e7a523e8acc91ee65
Author: Tomas Popela <tpopela redhat com>
Date: Fri Sep 5 13:37:59 2014 +0200
EHTMLEditorView - Avoid extra new line when quoting the text
Don't insert the unnecessary BR element before the BR element that is
used for wrapping as it will end in unnecessary new line.
e-util/e-html-editor-view.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 892b570..acd5280 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -3210,6 +3210,7 @@ insert_quote_symbols_before_node (WebKitDOMDocument *document,
gint quote_level,
gboolean is_html_node)
{
+ gboolean skip;
gchar *quotation;
WebKitDOMElement *element;
@@ -3219,7 +3220,11 @@ insert_quote_symbols_before_node (WebKitDOMDocument *document,
webkit_dom_html_element_set_inner_html (
WEBKIT_DOM_HTML_ELEMENT (element), quotation, NULL);
- if (is_html_node) {
+ /* Don't insert temporary BR before BR that is used for wrapping */
+ skip = WEBKIT_DOM_IS_HTMLBR_ELEMENT (node);
+ skip = skip && element_has_class (WEBKIT_DOM_ELEMENT (node), "-x-evo-wrap-br");
+
+ if (is_html_node && !skip) {
WebKitDOMElement *new_br;
new_br = webkit_dom_document_create_element (document, "br", NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]