Issue #77: fix bug with emitting comments.

This commit is contained in:
Steven Black 2016-03-24 23:34:28 -04:00
parent be64c93a22
commit 30e5d843d4

View File

@ -320,9 +320,7 @@ def removeDupsAndExcl(mergeFile):
# replace tabs with space
line = line.replace('\t+', ' ')
# Trim trailing whitespace
line = line.rstrip()
if not line:
continue
line = line.rstrip() + "\n"
# Testing the first character doesn't require startswith
if line[0] == '#' or re.match(r'^\s*$', line[0]):
# Cross-python write