-
-
Save tetsuharuohzeki/3827471 to your computer and use it in GitHub Desktop.
Preprocesser.py bug fix patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# Parent 635fcc11d2b16265114d6bbc02768d007f73d66b | |
# User smellman? <???@???.???> | |
diff --git a/config/Preprocessor.py b/config/Preprocessor.py | |
--- a/config/Preprocessor.py | |
+++ b/config/Preprocessor.py | |
@@ -377,16 +377,18 @@ class Preprocessor: | |
# Strips blank lines from the output. | |
def filter_emptyLines(self, aLine): | |
if aLine == '\n': | |
return '' | |
return aLine | |
# slashslash | |
# Strips everything after // | |
def filter_slashslash(self, aLine): | |
+ if (aLine.find('//') == -1): | |
+ return aLine | |
[aLine, rest] = aLine.split('//', 1) | |
if rest: | |
aLine += '\n' | |
return aLine | |
# spaces | |
# Collapses sequences of spaces into a single space | |
def filter_spaces(self, aLine): | |
return re.sub(' +', ' ', aLine).strip(' ') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment