SF.net SVN: geany:[4617] branches/geany-0.18.1

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Jan 31 16:29:12 UTC 2010


Revision: 4617
          http://geany.svn.sourceforge.net/geany/?rev=4617&view=rev
Author:   eht16
Date:     2010-01-31 16:29:12 +0000 (Sun, 31 Jan 2010)

Log Message:
-----------
Backport from trunk:
Improve parsing of sections and chapters by ignoring shortnames like \section[shortname]{label} (closes #2890477).

Modified Paths:
--------------
    branches/geany-0.18.1/ChangeLog
    branches/geany-0.18.1/tagmanager/latex.c

Modified: branches/geany-0.18.1/ChangeLog
===================================================================
--- branches/geany-0.18.1/ChangeLog	2010-01-31 16:28:42 UTC (rev 4616)
+++ branches/geany-0.18.1/ChangeLog	2010-01-31 16:29:12 UTC (rev 4617)
@@ -30,6 +30,12 @@
    Kurt de Bree into section of previous translators.
 
 
+2009-11-22  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * tagmanager/latex.c:
+   Improve parsing of sections and chapters by ignoring shortnames
+   like \section[shortname]{label} (closes #2890477).
+
 2009-11-17  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * doc/geany.txt:

Modified: branches/geany-0.18.1/tagmanager/latex.c
===================================================================
--- branches/geany-0.18.1/tagmanager/latex.c	2010-01-31 16:28:42 UTC (rev 4616)
+++ branches/geany-0.18.1/tagmanager/latex.c	2010-01-31 16:29:12 UTC (rev 4617)
@@ -80,8 +80,15 @@
  	l++;
     if (flags & (TEX_BRACES | TEX_LABEL))
     {
- 	if ((*(l++)) != '{')
+	if (*l == '[')
+	{
+	    while (*l != ']')
+		l++;
+	    l++; /* skip the closing square bracket */
+	}
+	if (*l != '{')
  	    goto no_tag;
+	l++;
      }
      if (flags & TEX_BSLASH)
      {


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