Skip to content

Instantly share code, notes, and snippets.

@codebrainz
Created May 4, 2014 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codebrainz/39df6da5fb39c118d477 to your computer and use it in GitHub Desktop.
Save codebrainz/39df6da5fb39c118d477 to your computer and use it in GitHub Desktop.
Index: tagmanager/python.c
===================================================================
--- tagmanager/python.c (revision 5850)
+++ tagmanager/python.c (working copy)
@@ -478,6 +478,9 @@
for (; *cp; cp++)
{
+ if (*cp == '#')
+ break;
+
if (*cp == '"' || *cp == '\'')
{
if (strncmp(cp, doubletriple, 3) == 0)
@@ -674,14 +677,14 @@
indent = cp - line;
line_skip = 0;
- checkParent(nesting_levels, indent, parent);
-
/* Deal with multiline string ending. */
if (longStringLiteral)
{
find_triple_end(cp, &longStringLiteral);
continue;
}
+
+ checkParent(nesting_levels, indent, parent);
/* Deal with multiline string start. */
longstring = find_triple_start(cp, &longStringLiteral);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment