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 690385 - markdown parsing bug
markdown parsing bug
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.2
Other Windows
: Normal minor
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2012-12-17 23:02 UTC by Nate
Modified: 2012-12-26 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nate 2012-12-17 23:02:05 UTC
When parsing parameter tags in a comment block, adjacent parameters that use underscores in the variable name can cause inadvertent markdown HTML to be generated. Specifically, lines like:

/**
  @param _foo first arg
  @param bar_ second arg
**/
void function foo(_foo, bar_);

Will cause spurious emphasis tags to be output in the generated HTML docs. Something like:

... <em>foo first arg
... bar<em> second arg

Whereas I think the intent of markdown in this case is to emphasize text, but not across entities such as @params, like below:
 
/** my comment block, _something important!_ **/
would become:
<html> ... my comment block, <em>something important</em> ... </html>

I've included as text a test case for the strange behavior below this line, as file Foo.cpp:

//Begin Foo.cpp
#include <iostream>
using namespace std;

class Foo {
public:
  /**
    Generated HTML has spurious \<em\> \</em\> tags before arg1 and after arg2
    in the <b>Parameters:</b> section, if MARKDOWN_SUPPORT = YES in the Doxyfile

    @param _arg1 first argument
    @param arg2_ second argument
  */
  static void foo1(int _arg1, int arg2_) {}

  /**
    One fix is to insert a blank line between the offending \@param lines

    @param _arg1 first argument

    @param arg2_ second argument
  */
  static void foo2(int _arg1, int arg2_) {}

  /**
    No problems with two leading underscores

    @param _arg1 first argument
    @param _arg2 second argument
  */
  static void foo3(int _arg1, int _arg2) {}

  /**
    No problems with two trailing underscores

    @param arg1_ first argument
    @param arg2_ second argument
  */
  static void foo3(int arg1_, int arg2_) {}

  /**
    No problems with trailing followed by leading underscore

    @param arg1_ first argument
    @param _arg2 second argument
  */
  static void foo3(int arg1_, int _arg2) {}
};
//End Foo.cpp

Hope that helps!

-Nate
Comment 1 Dimitri van Heesch 2012-12-19 10:32:15 UTC
Confirmed. Should be fixed in the next subversion update.
Comment 2 Dimitri van Heesch 2012-12-26 16:09:24 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.3. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.