[evolution] EHTMLEditorView - Block is wrongly preserved in the beginning of quoted content



commit 6620a83b65003acbabe06487aa4570bcc1561e41
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Feb 27 10:56:11 2015 +0100

    EHTMLEditorView - Block is wrongly preserved in the beginning of quoted content

 e-util/e-html-editor-view.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index d97553e..c092783 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -4518,8 +4518,10 @@ parse_html_into_paragraphs (EHTMLEditorView *view,
                        rest = with_br ?
                                to_insert + 4 + (with_br - to_insert) : to_insert;
 
-               if (!rest)
+               if (!rest) {
+                       preserve_next_line = FALSE;
                        goto next;
+               }
 
                if (*rest) {
                        gboolean empty = FALSE;
@@ -4529,7 +4531,7 @@ parse_html_into_paragraphs (EHTMLEditorView *view,
                        g_strchomp (truncated);
                        empty = !*truncated && strlen (rest) > 0;
 
-                       if (strchr (" +- *=\t", *rest))
+                       if (strchr (" +- *=\t;#", *rest))
                                preserve_block = FALSE;
 
                        rest_to_insert = g_regex_replace_eval (
@@ -4650,8 +4652,10 @@ parse_html_into_paragraphs (EHTMLEditorView *view,
                                        blockquote,
                                        block,
                                        "<br class=\"-x-evo-first-br\">");
-                       }
-               }
+                       } else
+                               preserve_next_line = FALSE;
+               } else
+                       preserve_next_line = FALSE;
  next:
                first_element = FALSE;
                prev_br = next_br;


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