[pango] markup: Always start with a <markup> tag
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] markup: Always start with a <markup> tag
- Date: Fri, 14 Dec 2012 07:05:56 +0000 (UTC)
commit 25d42226b50862a44ac91eba10511465fca61332
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Jul 2 15:10:21 2012 -0400
markup: Always start with a <markup> 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 files changed, 10 insertions(+), 16 deletions(-)
---
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index abefaf8..a66fe50 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, "<markup>", 8) == 0)
- needs_root = FALSE;
-
- if (needs_root)
- if (!g_markup_parse_context_parse (context,
- "<markup>",
- -1,
- error))
- goto error;
+ if (!g_markup_parse_context_parse (context,
+ "<markup>",
+ -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,
- "</markup>",
- -1,
- error))
- goto error;
+ if (!g_markup_parse_context_parse (context,
+ "</markup>",
+ -1,
+ error))
+ goto error;
if (!g_markup_parse_context_end_parse (context, error))
goto error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]