Created
August 18, 2012 07:48
-
-
Save smellman/3385103 to your computer and use it in GitHub Desktop.
Preprocesser.py slashslash fixed
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
#original | |
def filter_slashslash(self, aLine): | |
[aLine, rest] = aLine.split('//', 1) | |
if rest: | |
aLine += '\n' | |
return aLine | |
#fixed | |
def filter_slashslash(self, aLine): | |
if (aLine.find('//') == -1): | |
return aLine | |
[aLine, rest] = aLine.split('//', 1) | |
if rest: | |
aLine += '\n' | |
return aLine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment