Fix text parser leaf-list / leaf succession

See https://github.com/clicon/clixon/issues/324
This commit is contained in:
Olof hagsand 2022-06-06 15:40:07 +02:00
parent 4f9ed02a46
commit 01b38c6645

View file

@ -156,12 +156,13 @@ xml2txt1(cxobj *xn,
}
}
}
if (yn && yang_keyword_get(yn) == Y_LEAF_LIST && *leafl){
if (strcmp(*leaflname, yang_argument_get(yn)) != 0){
if (*leafl && yn){
if (yang_keyword_get(yn) == Y_LEAF_LIST && strcmp(*leaflname, yang_argument_get(yn)) == 0)
;
else{
*leafl = 0;
*leaflname = NULL;
(*fn)(f, "%*s\n", 4*(level), "]");
// XXX
}
}
xc = NULL; /* count children (elements and bodies, not attributes) */