From 047eb93fa8afc06afd97d14820745c2f8dafcc7e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 26 Mar 2024 12:45:34 -0400 Subject: More XML fixes --- ast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ast.c b/ast.c index 742f8032..029b1ba4 100644 --- a/ast.c +++ b/ast.c @@ -58,8 +58,8 @@ CORD when_clauses_to_xml(when_clause_t *clauses) { CORD c = CORD_EMPTY; for (; clauses; clauses = clauses->next) { c = CORD_all(c, "var) c = CORD_all(c, " var=", Match(clauses->var, Var)->name); - c = CORD_all(c, " tag=", ast_to_xml(clauses->tag_name), ">", ast_to_xml(clauses->body), ""); + if (clauses->var) c = CORD_all(c, " var=\"", Match(clauses->var, Var)->name, "\""); + c = CORD_all(c, " tag=\"", ast_to_xml(clauses->tag_name), "\">", ast_to_xml(clauses->body), ""); } return c; } -- cgit v1.2.3