summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2012-07-02 15:10:21 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2012-12-14 02:03:43 -0500
commit25d42226b50862a44ac91eba10511465fca61332 (patch)
tree616f57169b7c5cd6be77d4b1612b52a4a45d967e /pango
parentc3078a06ce707762699c8cef3f2c7815ce47d333 (diff)
downloadpango-25d42226b50862a44ac91eba10511465fca61332.tar.gz
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
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-markup.c26
1 files 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, "<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;