summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2016-09-12 18:59:02 +0200
committerSilvan Jegen <s.jegen@gmail.com>2016-09-12 18:59:02 +0200
commit3872213cbebfd8c923b6731cc107706bbd9ab5eb (patch)
treebae4b362895a491b44dfa8230cbbd14a81a03f59
parent933d3f31965010d90cb09759a00f86618097f0a4 (diff)
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.
-rw-r--r--yxml.c4
1 files changed, 1 insertions, 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);