[evolution/gnome-3-22] Optimise how a quote element is created



commit aa7e80456de52cd8537a6cda74882e235dcffc4e
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 e6a6cb0..2f5c5ef 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]