-
-
Notifications
You must be signed in to change notification settings - Fork 209
Open
Description
Quoting a paragraph in doxygen (see doxygen/doxygen#11586) erroneously propagates newlines to the XML output, even for non-verbatim text. Breathe then converts these newlines to paragraphs, resulting in <p></p> markers in HTML and new paragraphs in LaTeX.
Expected behavior
Single newlines, except in verbatim mode, should be discarded. Only the doxygen-generated <para> tags should result in paragraph separators in plain-text mode.
Example
//! \file example.h
/*!
* \class Example
*
* \brief Example demonstrating erroneous output.
*
* The following paragraph has new paragraph markers internally when started
* with a quote:
*
* "Lorem ipsum dolor sit amet,
* consectetur adipiscing elit, sed do eiusmod tempor
* incididunt ut labore et
* dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
* ullamco laboris nisi ut aliquip ex ea commodo consequat."
*
* But it's fine if the quote appears in the middle of a paragraph: "Lorem
* ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
* incididunt ut labore et dolore magna aliqua."
*
* "It doesn't matter if the paragraph end
* is after" the final quotation: the newlines still appear.
*
* \"It's also fine
* if using escaped quotes.\"
*
* Paragraphs without quotes are unaffected.
*
* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
* incididunt ut labore et dolore magna aliqua.
*/
class Example {};with
# Doxyfile 1.12.0
GENERATE_XML = YES
GENERATE_HTML = NO
GENERATE_LATEX = NO
and a minimal conf/rst
example documentation
=====================
.. doxygenclass:: ExampleRenders as:
because the XML contains newlines:
<detaileddescription>
<para>The following paragraph has new paragraph markers internally when started with a quote:</para>
<para>"Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat."</para>
<para>But it's fine if the quote appears in the middle of a paragraph: "Lorem
ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua."</para>
<para>"It doesn't matter if the paragraph end
is after" the final quotation: the newlines still appear.</para>
<para>"It's also fine if using escaped quotes."</para>
<para>Paragraphs without quotes are unaffected.</para>
<para>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </para>
</detaileddescription>I've generated this minimal reproducing example from an example in my code's real-life documentation .

Workaround
As the example shows, escaping the quotation marks should fix the problem.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels