Revision: 2258 http://geany.svn.sourceforge.net/geany/?rev=2258&view=rev Author: eht16 Date: 2008-02-15 08:31:46 -0800 (Fri, 15 Feb 2008)
Log Message: ----------- Fix parsing bug when there is text after the end of a multi line comment (closes #1894084).
Modified Paths: -------------- trunk/tagmanager/python.c
Modified: trunk/tagmanager/python.c =================================================================== --- trunk/tagmanager/python.c 2008-02-13 18:54:05 UTC (rev 2257) +++ trunk/tagmanager/python.c 2008-02-15 16:31:46 UTC (rev 2258) @@ -88,6 +88,7 @@ gint indent; const unsigned char *line; boolean inMultilineString = FALSE; + boolean wasInMultilineString = FALSE; lastClass *lastclass = NULL; boolean inFunction = FALSE; gint fn_indent = 0; @@ -102,17 +103,24 @@ strncmp ((const char*) cp, """"", (size_t) 3) == 0) { inMultilineString = (boolean) !inMultilineString; + if (! inMultilineString) + wasInMultilineString = TRUE; cp += 3; } if (*cp==''' && strncmp ((const char*) cp, "'''", (size_t) 3) == 0) { inMultilineString = (boolean) !inMultilineString; + if (! inMultilineString) + wasInMultilineString = TRUE; cp += 3; }
- if (*cp == '\0') + if (*cp == '\0' || wasInMultilineString) + { + wasInMultilineString = FALSE; break; // at end of multiline string + }
// update indent-sensitive things if (!inMultilineString && !isspace(*cp))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.