SF.net SVN: geany:[5851] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Wed Jun 15 21:01:24 UTC 2011


Revision: 5851
          http://geany.svn.sourceforge.net/geany/?rev=5851&view=rev
Author:   eht16
Date:     2011-06-15 21:01:23 +0000 (Wed, 15 Jun 2011)

Log Message:
-----------
Fix two bugs with triple quoted strings within comments and missing indentation within triple quoted strings (#3316966, synced from CTags SVN, patch by Elias Pschernig, thanks).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tagmanager/python.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2011-06-14 21:23:19 UTC (rev 5850)
+++ trunk/ChangeLog	2011-06-15 21:01:23 UTC (rev 5851)
@@ -1,3 +1,11 @@
+2011-06-15  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * tagmanager/python.c:
+   Fix two bugs with triple quoted strings within comments
+   and missing indentation within triple quoted strings
+   (#3316966, synced from CTags SVN, patch by Elias Pschernig, thanks).
+
+
 2011-06-14  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * data/filetypes.python:

Modified: trunk/tagmanager/python.c
===================================================================
--- trunk/tagmanager/python.c	2011-06-14 21:23:19 UTC (rev 5850)
+++ trunk/tagmanager/python.c	2011-06-15 21:01:23 UTC (rev 5851)
@@ -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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list