diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2016-09-12 18:59:02 +0200 |
---|---|---|
committer | Silvan Jegen <s.jegen@gmail.com> | 2016-09-12 18:59:02 +0200 |
commit | 3872213cbebfd8c923b6731cc107706bbd9ab5eb (patch) | |
tree | bae4b362895a491b44dfa8230cbbd14a81a03f59 | |
parent | 933d3f31965010d90cb09759a00f86618097f0a4 (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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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); |