From 3509491dd94cc371f5b0a4166274532acc5e6764 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Tue, 22 Aug 2023 14:56:28 -0500 Subject: T5500: render_tag_node_child does not need to consider values Configtree allows for a tag node child to have values, however it is not possible to define such an object in the XML interface-definitions, hence that case can be ignored in render_tag_node_child. --- src/config_tree.ml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/config_tree.ml') diff --git a/src/config_tree.ml b/src/config_tree.ml index b993836..531cae8 100644 --- a/src/config_tree.ml +++ b/src/config_tree.ml @@ -205,18 +205,10 @@ struct let name = Vytree.name_of_node node in let data = Vytree.data_of_node node in let comment = render_comment indent_str data.comment in - let values = render_values ~ord_val:ord_val indent_str name data.values in let children = Vytree.children_of_node node in - match children with - (* This produces too much whitespace due to indent_str from values, - but the issue is cosmetic *) - | [] -> Printf.sprintf "%s%s%s %s" comment indent_str parent values - | _ -> - (* Exploiting the fact that immediate children of tag nodes are - never themselves tag nodes *) - let inner = List.map (render_node ~ord_val:ord_val indent (level + 1)) children in - let inner = String.concat "" inner in - Printf.sprintf "%s%s%s %s {\n%s%s}\n" comment indent_str parent name inner indent_str + let inner = List.map (render_node ~ord_val:ord_val indent (level + 1)) children in + let inner = String.concat "" inner in + Printf.sprintf "%s%s%s %s {\n%s%s}\n" comment indent_str parent name inner indent_str let render_config ?(ord_val=false) node = let children = Vytree.children_of_node node in -- cgit v1.2.3