aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-09-05 19:37:59 +0800
committerTomas Popela <tpopela@redhat.com>2014-09-05 19:51:43 +0800
commitfa55238d1ebf5e454d66858e7a523e8acc91ee65 (patch)
treee85496900fc80a3de6a8682e394c86dce80ffbcb /e-util
parentdbb776e1c50db403ea246323aed8310307faf6ce (diff)
downloadgsoc2013-evolution-fa55238d1ebf5e454d66858e7a523e8acc91ee65.tar
gsoc2013-evolution-fa55238d1ebf5e454d66858e7a523e8acc91ee65.tar.gz
gsoc2013-evolution-fa55238d1ebf5e454d66858e7a523e8acc91ee65.tar.bz2
gsoc2013-evolution-fa55238d1ebf5e454d66858e7a523e8acc91ee65.tar.lz
gsoc2013-evolution-fa55238d1ebf5e454d66858e7a523e8acc91ee65.tar.xz
gsoc2013-evolution-fa55238d1ebf5e454d66858e7a523e8acc91ee65.tar.zst
gsoc2013-evolution-fa55238d1ebf5e454d66858e7a523e8acc91ee65.zip
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.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-html-editor-view.c7
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 892b570deb..acd52806bc 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);