Skip to content

Commit

Permalink
Fixing indentation miss alignment in comments commeing from nxdl to n…
Browse files Browse the repository at this point in the history
…yaml.
  • Loading branch information
RubelMozumder committed Oct 30, 2023
1 parent 56f5191 commit e616851
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dev_tools/nyaml2nxdl/nyaml2nxdl_backward_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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):
"""
Expand Down

0 comments on commit e616851

Please sign in to comment.