[evolution/gnome-3-20] EHTMLEditorView - Some empty new lines in a quoted content could be lost



commit d57cd0734830c34556182fc77ec573217e82d4d9
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Jun 1 15:00:38 2016 +0200

    EHTMLEditorView - Some empty new lines in a quoted content could be lost

 e-util/e-html-editor-view.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 1147dd2..54e35a9 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -7418,6 +7418,8 @@ parse_html_into_blocks (EHTMLEditorView *view,
        while (next_br) {
                gboolean local_ignore_next_br = ignore_next_br;
                gboolean local_preserve_next_line = preserve_next_line;
+               gboolean local_previously_had_empty_citation_start =
+                       previously_had_empty_citation_start;
                gboolean preserve_block = TRY_TO_PRESERVE_BLOCKS;
                const gchar *citation = NULL, *citation_end = NULL;
                const gchar *rest = NULL, *with_br = NULL;
@@ -7631,6 +7633,14 @@ parse_html_into_blocks (EHTMLEditorView *view,
                                        parent,
                                        block_template,
                                        "<br id=\"-x-evo-first-br\">");
+                       } else if (local_previously_had_empty_citation_start &&
+                                  !citation && with_br && rest && !*rest) {
+                               /* Empty citation */
+                               if (block)
+                                       append_new_block (parent, &block);
+
+                               block = create_and_append_new_block (
+                                       selection, document, parent, block_template, "<br>");
                        } else
                                preserve_next_line = FALSE;
                } else if (first_element && !citation_was_first_element) {


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