From d57d88b3ccd66a903d4271f41ecc5f2cdafd2b61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 13 Dec 2017 21:30:02 +0100 Subject: [PATCH] doxygen: verify that more cases of blocks and code touching work. --- doxygen/dox2html5.py | 3 ++- doxygen/test/contents_code/index.html | 2 +- doxygen/test/contents_code/input.dox | 12 ++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 1171077c..558206f5 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -258,7 +258,8 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. # there's no text after and it's the last thing in the # paragraph (Doxygen ALSO doesn't separate end of a section # and begin of a code block by a paragraph even if there is - # a blank line.) + # a blank line. But it does so for xrefitems such as @todo. + # I don't even.) (previous_section and (not i.tail or not i.tail.strip()) and index + 1 == element_children_count) ): end_previous_paragraph = True diff --git a/doxygen/test/contents_code/index.html b/doxygen/test/contents_code/index.html index 3dcfa983..148c5a33 100644 --- a/doxygen/test/contents_code/index.html +++ b/doxygen/test/contents_code/index.html @@ -42,7 +42,7 @@ // a block // that is indented // but has a lot of trailing whitespace which should be removed -}
// this is a new block

The constexpr functions are pure.

Code block inside a list (has to be done using HTML):

+}
// this is a new block
// code?

And code block after a blockquote as well:

// another block

The constexpr functions are pure.

Code block inside a list (has to be done using HTML):

diff --git a/doxygen/test/contents_code/input.dox b/doxygen/test/contents_code/input.dox index 299c37e9..25588804 100644 --- a/doxygen/test/contents_code/input.dox +++ b/doxygen/test/contents_code/input.dox @@ -28,6 +28,18 @@ spaces. But not when it is in (@code{.cpp} std::exit(2); @endcode) parentheses. // this is a new block @endcode +@todo However, code block after an xrefitem is delimited properly by Doxygen: + +@code{.cpp} +// code? +@endcode + +> And code block after a blockquote as well: + +@code{.cpp} +// another block +@endcode + @attention Inline code after a note should not be treated as block, though: The @code{.cpp} constexpr @endcode functions are pure. -- 2.30.2