[yelp] [yelp-mallard-document] Fix dropping of sections from the cache
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] [yelp-mallard-document] Fix dropping of sections from the cache
- Date: Tue, 10 Aug 2010 16:51:33 +0000 (UTC)
commit a5850bbef17d0e27af5b5ecf948eb4d1252c5157
Author: Shaun McCance <shaunm gnome org>
Date: Tue Aug 10 12:51:20 2010 -0400
[yelp-mallard-document] Fix dropping of sections from the cache
If a section has a bare ID that's equal to an existing page ID, it ran afoul of the
duplicate-page-ID check, which of course should only check *page* IDs.
libyelp/yelp-mallard-document.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libyelp/yelp-mallard-document.c b/libyelp/yelp-mallard-document.c
index 4141782..307fde9 100644
--- a/libyelp/yelp-mallard-document.c
+++ b/libyelp/yelp-mallard-document.c
@@ -461,12 +461,15 @@ mallard_page_data_walk (MallardPageData *page_data)
page_data->xpath = xmlXPathNewContext (page_data->xmldoc);
mallard_page_data_walk (page_data);
} else {
+ gboolean ispage;
xmlNodePtr child, oldcur, oldcache, info;
id = xmlGetProp (page_data->cur, BAD_CAST "id");
if (id == NULL)
goto done;
- if (g_hash_table_lookup (priv->pages_hash, id) != NULL)
+
+ ispage = xmlStrEqual (page_data->cur->name, BAD_CAST "page");
+ if (ispage && g_hash_table_lookup (priv->pages_hash, id) != NULL)
goto done;
page_data->cache = xmlNewChild (page_data->cache,
@@ -474,7 +477,7 @@ mallard_page_data_walk (MallardPageData *page_data)
page_data->cur->name,
NULL);
- if (xmlStrEqual (page_data->cur->name, BAD_CAST "page")) {
+ if (ispage) {
xmlChar *style;
gchar **styles;
gchar *icon = "help-contents";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]