Skip to content

Instantly share code, notes, and snippets.

@smellman
Created August 18, 2012 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save smellman/3385103 to your computer and use it in GitHub Desktop.
Save smellman/3385103 to your computer and use it in GitHub Desktop.
Preprocesser.py slashslash fixed
#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