Skip to content

Commit

Permalink
Merge pull request #110 from kairu-ms/fix-generate-string-with-now-line
Browse files Browse the repository at this point in the history
fix bug to print string with newline
  • Loading branch information
kairu-ms authored Aug 10, 2022
2 parents cec7cc5 + 8915588 commit ec68852
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/aaz_dev/cli/templates/_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def is_stable(env, stage):
@pass_environment
def constant_convert(env, data):
if isinstance(data, str):
return f'"%s"' % data.replace('"', '\\"')
return f'"%s"' % data.replace('"', '\\"').replace('\n', '\\n')
elif isinstance(data, (int, float, bool)):
return f"{data}"
elif data is None:
Expand Down
2 changes: 1 addition & 1 deletion src/aaz_dev/command/model/configuration/_arg_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def get_help(self):

if hasattr(self.schema, 'description') and self.schema.description:
h = CMDArgumentHelp()
h.short = self.schema.description
h.short = self.schema.description.replace('\n', ' ')
return h
return None

Expand Down

0 comments on commit ec68852

Please sign in to comment.