[evolution] EHTMLEditorView: Skip BR on the end of HTML that's parsed into paragraphs



commit 1ab3eeec5ddc03584dbac05c6f4a0b8879faa000
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Jun 10 12:59:54 2014 +0200

    EHTMLEditorView: Skip BR on the end of HTML that's parsed into paragraphs
    
    Do that to avoid unnecessary empty paragraph element.

 e-util/e-html-editor-view.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index a2472b1..4ad98b2 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -2409,7 +2409,7 @@ parse_html_into_paragraphs (EHTMLEditorView *view,
                g_free (to_insert);
        }
 
-       if (g_utf8_strlen (prev_br, -1) > 0) {
+       if (g_utf8_strlen (prev_br, -1) > 0 && (g_strcmp0 (prev_br, "<br>") != 0)) {
                WebKitDOMElement *paragraph;
 
                if (use_pre) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]