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 726294 - Markdown Extra - fenced code block: '>' before tab width parsed as block quote
Markdown Extra - fenced code block: '>' before tab width parsed as block quote
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.6
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2014-03-14 01:06 UTC by Tim
Modified: 2014-04-21 10:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim 2014-03-14 01:06:51 UTC
Given this example markdown:

~~~{.cpp}
template <
    typename Mixins
> class Thing : public Mixins... {};

struct FooFunctionality;
struct BarFunctionality;
struct BazFunctionality;

Thing<
    FooFunctionality,
    BarFunctionality,
    BazFunctionality
> thing;

// I hope no one ever writes an if statement like this.
if (
 a
 >
 b
)
{
    bar();
}
    
stream >> a
>> b;

stream >> a
 >> b;
 
stream >> a
  >> b;
  
stream >> a
   >> b;
   
stream >> a
    >> b;
~~~

HTML generated by Doxygen has text block withe the following content:

template <
    typename Mixins
<blockquote>
class Thing : public Mixins... {};
</blockquote>
struct FooFunctionality;
struct BarFunctionality;
struct BazFunctionality;
Thing<
    FooFunctionality,
    BarFunctionality,
    BazFunctionality
<blockquote>
thing;
</blockquote>
// I hope no one ever writes an if statement like this.
if (
 a
<blockquote>
</blockquote>
 b
)
{
    bar();
}
stream >> a
<blockquote>
<blockquote>
b;
</blockquote>
</blockquote>
stream >> a
<blockquote>
<blockquote>
b;
</blockquote>
</blockquote>
stream >> a
<blockquote>
<blockquote>
b;
</blockquote>
</blockquote>
stream >> a
<blockquote>
<blockquote>
b;
</blockquote>
</blockquote>
stream >> a
    >> b;



You can see that any line that starts with a '>' before the tab width is
reached is treated as a block quote (with nesting allowed).


I guess there are 2 possible errors here:
a) Looking for block quotes within a fenced code block should not occur (my preference)
b) Block quote generation within a code fence is incorrect (I don't really know why anyone would want to do this)

I have tested this on both 1.8.5 and 1.8.6
Comment 1 Dimitri van Heesch 2014-03-17 20:34:19 UTC
Confirmed. Should be fixed in the next GIT update.
Comment 2 Dimitri van Heesch 2014-04-21 10:09:27 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.7. 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 (preferrably in the form of a self-contained example).