From ed8e9ec9fec8b32c17b4cb51a9052751cb5d74b4 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Thu, 7 Aug 2014 11:33:51 +0200 Subject: EHTMLEditorSelection - Remove just the BR elements that are used for the wrapping unless it is forced --- e-util/e-html-editor-selection.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'e-util') diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c index 86f96ce971..ee9937fa7b 100644 --- a/e-util/e-html-editor-selection.c +++ b/e-util/e-html-editor-selection.c @@ -5090,8 +5090,12 @@ wrap_lines (EHTMLEditorSelection *selection, while (nd) { WebKitDOMNode *next_nd = webkit_dom_node_get_next_sibling (nd); - if (WEBKIT_DOM_IS_HTMLBR_ELEMENT (nd)) - remove_node (nd); + if (WEBKIT_DOM_IS_HTMLBR_ELEMENT (nd)) { + if (remove_all_br) + remove_node (nd); + else if (element_has_class (WEBKIT_DOM_ELEMENT (nd), "-x-evo-wrap-br")) + remove_node (nd); + } nd = next_nd; } } -- cgit v1.2.3