Commit 821bdbe6 authored by Taddeus Kroes's avatar Taddeus Kroes

Changed inline comment format for long commands.

parent 01cc0055
...@@ -54,9 +54,12 @@ def write_statements(statements): ...@@ -54,9 +54,12 @@ def write_statements(statements):
diff = start - len(line.expandtabs(TABSIZE)) diff = start - len(line.expandtabs(TABSIZE))
# The comment must not be directly adjacent to the command itself # 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 # Add newline at end of command
line += '\n' line += '\n'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment