SF.net SVN: geany:[4437] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Nov 22 23:51:59 UTC 2009


Revision: 4437
          http://geany.svn.sourceforge.net/geany/?rev=4437&view=rev
Author:   eht16
Date:     2009-11-22 23:51:59 +0000 (Sun, 22 Nov 2009)

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

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-11-22 18:25:09 UTC (rev 4436)
+++ trunk/ChangeLog	2009-11-22 23:51:59 UTC (rev 4437)
@@ -4,6 +4,9 @@
    src/geanymenubuttonaction.h:
    Use separate tooltips for toolbar menu buttons and their attached
    drop-down arrows.
+ * tagmanager/latex.c:
+   Improve parsing of sections and chapters by ignoring shortnames
+   like \section[shortname]{label} (closes #2890477).
 
 
 2009-11-19  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/tagmanager/latex.c
===================================================================
--- trunk/tagmanager/latex.c	2009-11-22 18:25:09 UTC (rev 4436)
+++ trunk/tagmanager/latex.c	2009-11-22 23:51:59 UTC (rev 4437)
@@ -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