After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 599224 - code.cpp generates extra </span> tags
code.cpp generates extra </span> tags
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.6.1
Other All
: Normal minor
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2009-10-21 18:14 UTC by Mike Sieweke
Modified: 2009-12-30 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike Sieweke 2009-10-21 18:14:14 UTC
The HTML generated for C code has the occasional extra </span> tag.  Some HTML parsers (including the one in swish-e) declare errors on the extra tags.

The problem is in endCodeLine() in code.cpp (although the same problem exists in code.l, fortrancode.cpp, fortrancode.l, latexgen.cpp, etc.).  This is the original function.  It writes a closing tag, but doesn't set g_currentFontClass to 0.  That lets a later point in the code send an extra closing tag.

#line 8852
static void endCodeLine()
{
  if (g_currentFontClass) { g_code->endFontClass(); }
  g_code->endCodeLine();
}

The fix is obvious:

static void endCodeLine()
{
  if (g_currentFontClass)
  {
    g_code->endFontClass();
    g_currentFontClass=0;
  }
  g_code->endCodeLine();
}
Comment 1 Dimitri van Heesch 2009-10-25 11:43:03 UTC
Indeed. I'll fix this in the next subversion update.
Comment 2 Dimitri van Heesch 2009-12-30 13:38:58 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.6.2. Please verify if this is indeed the case and reopen the
bug if you think it is not fixed (include any additional information that you
think can be relevant).