From 25d42226b50862a44ac91eba10511465fca61332 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 2 Jul 2012 15:10:21 -0400 Subject: markup: Always start with a tag It doesn't do anything bad, and will help us when we move to a stream-based approach. https://bugzilla.gnome.org/show_bug.cgi?id=679299 --- pango/pango-markup.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/pango/pango-markup.c b/pango/pango-markup.c index abefaf82..a66fe500 100644 --- a/pango/pango-markup.c +++ b/pango/pango-markup.c @@ -585,7 +585,6 @@ pango_parse_markup (const char *markup_text, { GMarkupParseContext *context = NULL; MarkupData *md = NULL; - gboolean needs_root = TRUE; GSList *tmp_list; const char *p; const char *end; @@ -626,15 +625,11 @@ pango_parse_markup (const char *markup_text, while (p != end && xml_isspace (*p)) ++p; - if (end - p >= 8 && strncmp (p, "", 8) == 0) - needs_root = FALSE; - - if (needs_root) - if (!g_markup_parse_context_parse (context, - "", - -1, - error)) - goto error; + if (!g_markup_parse_context_parse (context, + "", + -1, + error)) + goto error; if (!g_markup_parse_context_parse (context, @@ -643,12 +638,11 @@ pango_parse_markup (const char *markup_text, error)) goto error; - if (needs_root) - if (!g_markup_parse_context_parse (context, - "", - -1, - error)) - goto error; + if (!g_markup_parse_context_parse (context, + "", + -1, + error)) + goto error; if (!g_markup_parse_context_end_parse (context, error)) goto error; -- cgit v1.2.1