diff --git a/dev_tools/nyaml2nxdl/nyaml2nxdl_backward_tools.py b/dev_tools/nyaml2nxdl/nyaml2nxdl_backward_tools.py index caf79819e7..f6f543713d 100755 --- a/dev_tools/nyaml2nxdl/nyaml2nxdl_backward_tools.py +++ b/dev_tools/nyaml2nxdl/nyaml2nxdl_backward_tools.py @@ -378,6 +378,7 @@ def convert_to_yaml_comment(self, depth, text): """ # To store indentation text from comment lines = self.clean_and_organise_text(text, depth).split("\n") + indent = DEPTH_SIZE * depth mod_lines = [] for line in lines: line = line.strip() @@ -386,7 +387,7 @@ def convert_to_yaml_comment(self, depth, text): line = "# " + line mod_lines.append(line) # The starting '\n' to keep multiple comments separate - return "\n" + "\n".join(mod_lines) + return "\n" + indent + "\n".join(mod_lines) def print_root_level_info(self, depth, file_out): """