Skip to content
Snippets Groups Projects
Commit 821bdbe6 authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Changed inline comment format for long commands.

parent 01cc0055
No related branches found
No related tags found
No related merge requests found
......@@ -54,9 +54,12 @@ def write_statements(statements):
diff = start - len(line.expandtabs(TABSIZE))
# The comment must not be directly adjacent to the command itself
tabs = int(ceil(diff / float(TABSIZE))) + 1 if diff > 0 else 1
if diff > 0:
tabs = '\t' * (int(ceil(diff / float(TABSIZE))) + 1)
else:
tabs = ' '
line += '\t' * tabs + '#' + s.options['comment']
line += tabs + '#' + s.options['comment']
# Add newline at end of command
line += '\n'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment