[evolution] Optimise how a quote element is created



commit 932d4984c90846e550441c9bd033ef96ba5ac949
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Sep 23 13:12:25 2016 +0200

    Optimise how a quote element is created

 .../web-extension/e-editor-dom-functions.c         |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index e33669d..8fc86e2 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -977,15 +977,12 @@ e_editor_dom_get_citation_level (WebKitDOMNode *node,
 static gchar *
 get_quotation_for_level (gint quote_level)
 {
+       const gchar *quote_element = "<span class=\"-x-evo-quote-character\">" QUOTE_SYMBOL " </span>";
        gint ii;
        GString *output = g_string_new ("");
 
-       for (ii = 0; ii < quote_level; ii++) {
-               g_string_append (output, "<span class=\"-x-evo-quote-character\">");
-               g_string_append (output, QUOTE_SYMBOL);
-               g_string_append (output, " ");
-               g_string_append (output, "</span>");
-       }
+       for (ii = 0; ii < quote_level; ii++)
+               g_string_append (output, quote_element);
 
        return g_string_free (output, FALSE);
 }


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