summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2021-12-08 22:24:31 +0000
committerKatolaZ <katolaz@freaknet.org>2021-12-08 22:24:31 +0000
commite45f9c38cbcc4c544f0107d1abc79f4e1e039413 (patch)
tree9a150620a6336f602ded9869c42b53b73969ea2a
parentdf38d2270241927e5436a0bc36ffb99044a8f4fb (diff)
fix the condition to emit SEP in xmldataHEADmaster
-rw-r--r--xml2tsv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xml2tsv.c b/xml2tsv.c
index 27984bc..aea5751 100644
--- a/xml2tsv.c
+++ b/xml2tsv.c
@@ -176,8 +176,8 @@ xmlcdata(XMLParser *x, const char *d, size_t dl)
void
xmldata(XMLParser *x, const char *d, size_t dl)
{
- if (stack_peek(&st) || (strcspn(d, " \t\n") && emitsep)){
- putchar(SEP);
+ if ((strcspn(d, " \t\n") || (strspn(d, " \t\n")<strlen(d) && !stack_peek(&st)->ref)) && emitsep){
+ putchar(SEP);
emitsep = FALSE;
}
quote_print(d);