New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown parsing bug (Origin: bugzilla #690385) #4995

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity minor in component general for ---
Reported in version 1.8.2 on platform Other
Assigned to: Dimitri van Heesch

On 2012-12-17 23:02:05 +0000, Nate wrote:

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:

... foo first arg
... bar 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:

... my comment block, something important ...

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

//Begin Foo.cpp
#include
using namespace std;

class Foo {
public:
/**
Generated HTML has spurious <em> </em> tags before arg1 and after arg2
in the Parameters: 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

On 2012-12-19 10:32:15 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next subversion update.

On 2012-12-26 16:09:24 +0000, Dimitri van Heesch wrote:

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.

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment