GNOME Bugzilla – Bug 692162
markdown fenced code block not parsed
Last modified: 2013-05-19 12:36:01 UTC
# Overview: Markdown fenced code block interpreted as normal text when indent is large (>4). # Steps to Reproduce: - Create file example.h with contents: ~~~~ namespace NS1 { namespace NS2 { //! My class to do blah. /*! This class does blah. Example usage: ~~~~ MyClass bogus; bogus.some_function(); ~~~~ */ class MyClass { public: MyClass(); } } } ~~~~ - Create Doxyfile: $ doxygen -g - Edit Doxyfile and set INPUT to example.h - run doxygen: $ doxygen # Actual Result: Detailed description section contains: This class does blah. Example usage: ~~~~ MyClass bogus; bogus.some_function(); ~~~~ # Expected Result: Text between '~~~~' lines should be interpreted as code and formatted as such. # Version & Platform: version 1.8.3.1, Arch Linux 64-bit # Additional Information: The example above can be made to behave correctly by: - removing some spaces before the first '~~~~' to reduce the indent to less than 4 - inserting a newline after the start of the main comment block as follows: /*! This class does blah. Example usage: ~~~~ MyClass bogus; bogus.some_function(); ~~~~ */ What happens in the original case is that in isFencedCodeBlock() (src/markdown.cpp, line 1319), the refIndent variable is zero (checked by modifying 1.8.3.1 source and printing out variable). The isFencedCodeBlock() function does not check for the start of the code block beyond an indent of 4+refIndent, as this seems to be handled by the indented markdown code block isCodeBlock() function. So reducing the indent allows the start of the fenced code block to be detected. When the newline is inserted at the start of the comment block, the refIndent is correct.
Confirmed. Should be fixed in the next subversion update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.4. 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.