[gnome-software] Reduce the amount of debugging when parsing markdown



commit 8dce975599015e8eb36b1d19ad657b4a3f24fde5
Author: Richard Hughes <richard hughsie com>
Date:   Tue Sep 8 12:30:02 2015 +0100

    Reduce the amount of debugging when parsing markdown

 src/gs-markdown.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)
---
diff --git a/src/gs-markdown.c b/src/gs-markdown.c
index 0f6b4b1..1463ee8 100644
--- a/src/gs-markdown.c
+++ b/src/gs-markdown.c
@@ -660,8 +660,6 @@ gs_markdown_flush_pending (GsMarkdown *self)
                self->line_count++;
        }
 
-       g_debug ("adding '%s'", temp);
-
        /* clear */
        g_string_truncate (self->pending, 0);
 }
@@ -677,7 +675,6 @@ gs_markdown_to_text_line_process (GsMarkdown *self, const gchar *line)
        /* blank */
        ret = gs_markdown_to_text_line_is_blank (line);
        if (ret) {
-               g_debug ("blank: '%s'", line);
                gs_markdown_flush_pending (self);
                /* a new line after a list is the end of list, not a gap */
                if (self->mode != GS_MARKDOWN_MODE_BULLETT)
@@ -689,7 +686,6 @@ gs_markdown_to_text_line_process (GsMarkdown *self, const gchar *line)
        /* header1_type2 */
        ret = gs_markdown_to_text_line_is_header1_type2 (line);
        if (ret) {
-               g_debug ("header1_type2: '%s'", line);
                if (self->mode == GS_MARKDOWN_MODE_PARA)
                        self->mode = GS_MARKDOWN_MODE_H1;
                goto out;
@@ -698,7 +694,6 @@ gs_markdown_to_text_line_process (GsMarkdown *self, const gchar *line)
        /* header2_type2 */
        ret = gs_markdown_to_text_line_is_header2_type2 (line);
        if (ret) {
-               g_debug ("header2_type2: '%s'", line);
                if (self->mode == GS_MARKDOWN_MODE_PARA)
                        self->mode = GS_MARKDOWN_MODE_H2;
                goto out;
@@ -707,7 +702,6 @@ gs_markdown_to_text_line_process (GsMarkdown *self, const gchar *line)
        /* rule */
        ret = gs_markdown_to_text_line_is_rule (line);
        if (ret) {
-               g_debug ("rule: '%s'", line);
                gs_markdown_flush_pending (self);
                self->mode = GS_MARKDOWN_MODE_RULE;
                ret = gs_markdown_add_pending (self, self->tags.rule);
@@ -717,7 +711,6 @@ gs_markdown_to_text_line_process (GsMarkdown *self, const gchar *line)
        /* bullet */
        ret = gs_markdown_to_text_line_is_bullet (line);
        if (ret) {
-               g_debug ("bullet: '%s'", line);
                gs_markdown_flush_pending (self);
                self->mode = GS_MARKDOWN_MODE_BULLETT;
                ret = gs_markdown_add_pending (self, &line[2]);
@@ -727,7 +720,6 @@ gs_markdown_to_text_line_process (GsMarkdown *self, const gchar *line)
        /* header1 */
        ret = gs_markdown_to_text_line_is_header1 (line);
        if (ret) {
-               g_debug ("header1: '%s'", line);
                gs_markdown_flush_pending (self);
                self->mode = GS_MARKDOWN_MODE_H1;
                ret = gs_markdown_add_pending_header (self, &line[2]);
@@ -737,7 +729,6 @@ gs_markdown_to_text_line_process (GsMarkdown *self, const gchar *line)
        /* header2 */
        ret = gs_markdown_to_text_line_is_header2 (line);
        if (ret) {
-               g_debug ("header2: '%s'", line);
                gs_markdown_flush_pending (self);
                self->mode = GS_MARKDOWN_MODE_H2;
                ret = gs_markdown_add_pending_header (self, &line[3]);
@@ -752,7 +743,6 @@ gs_markdown_to_text_line_process (GsMarkdown *self, const gchar *line)
        }
 
        /* add to pending */
-       g_debug ("continue: '%s'", line);
        ret = gs_markdown_add_pending (self, line);
 out:
        /* if we failed to add, we don't know the mode */
@@ -895,8 +885,6 @@ gs_markdown_parse (GsMarkdown *self, const gchar *markdown)
 
        g_return_val_if_fail (GS_IS_MARKDOWN (self), NULL);
 
-       g_debug ("input='%s'", markdown);
-
        /* process */
        self->mode = GS_MARKDOWN_MODE_UNKNOWN;
        self->line_count = 0;
@@ -921,9 +909,6 @@ gs_markdown_parse (GsMarkdown *self, const gchar *markdown)
        temp = g_strdup (self->processed->str);
        g_string_truncate (self->pending, 0);
        g_string_truncate (self->processed, 0);
-
-       g_debug ("output='%s'", temp);
-
        return temp;
 }
 


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