From e4bd57fac54005ed7cdcc859989b88bfc3934448 Mon Sep 17 00:00:00 2001 From: Wu Xiaotian Date: Mon, 25 Nov 2019 15:32:16 +0800 Subject: ignore comment element in xml file When xml file is generated using intltool, the resulting xml file deletes the comment line, but when using gettext, it keeps the comment line. --- plugins/taglist/pluma-taglist-plugin-parser.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/taglist/pluma-taglist-plugin-parser.c b/plugins/taglist/pluma-taglist-plugin-parser.c index 75c06f39..6f18dbc5 100644 --- a/plugins/taglist/pluma-taglist-plugin-parser.c +++ b/plugins/taglist/pluma-taglist-plugin-parser.c @@ -120,6 +120,11 @@ parse_tag_group (TagGroup *tg, const gchar* fn, xmlDocPtr doc, while (cur != NULL) { + if (xmlStrcmp (cur->name, (const xmlChar *) "comment") == 0) + { + cur = cur->next; + } + if ((xmlStrcmp (cur->name, (const xmlChar *) "Tag")) || (cur->ns != ns)) { g_warning ("The tag list file '%s' is of the wrong type, " -- cgit v1.2.1