From 3872213cbebfd8c923b6731cc107706bbd9ab5eb Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Mon, 12 Sep 2016 18:59:02 +0200 Subject: Deal with nested elements better Occasionally there are nested elements in the article-title. Using this check we mostly succeed in dealing with those cases. --- yxml.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/yxml.c b/yxml.c index d16d070..c7e6d44 100644 --- a/yxml.c +++ b/yxml.c @@ -107,9 +107,7 @@ int process(char *fn, yxml_t *state) { break; case YXML_ELEMEND: - // Since article-title should not be nested, - // we don't have to check the element name here. - if (inarticletitle && intitlegroup) { + if (inarticletitle && !strcmp(state->elem, "title-group")) { inarticletitle = 0; intitlegroup = 0; printf("%s\n", contentbuf->buffer); -- cgit v1.2.1-18-gbd029