Permalink
Browse files

Remove only whitespaces for comment indentation

  • Loading branch information...
1 parent 80224b2 commit 85079533f6775ad17fac8dcfc4ecae3639b7166b @treyhunner treyhunner committed Jan 31, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 pycco/main.py
View
@@ -116,7 +116,10 @@ def save(docs, code):
elif multi_line:
# Remove leading spaces
- docs_text += line[len(indent_level):] + '\n'
+ if re.match(r' {%d}' % len(indent_level), line):
+ docs_text += line[len(indent_level):] + '\n'
+ else:
+ docs_text += line + '\n'
elif re.match(language["comment_matcher"], line):
if has_code:

0 comments on commit 8507953

Please sign in to comment.