From 192becca107fa758b0a6dc7e11ef86258fa13951 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 6 Dec 2017 14:02:57 +0100 Subject: [PATCH] doxygen: test case for problematic \snippet call. Somehow Doxygen is not wrapping \snippet in a paragraph, which causes the inline code detection to fail. --- doxygen/test/contents_code/Doxyfile | 1 + doxygen/test/contents_code/index.html | 4 +++- doxygen/test/contents_code/input.dox | 17 +++++++++++++++++ doxygen/test/contents_code/snippet.cpp | 9 +++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 doxygen/test/contents_code/snippet.cpp diff --git a/doxygen/test/contents_code/Doxyfile b/doxygen/test/contents_code/Doxyfile index d8d89a97..60356fdc 100644 --- a/doxygen/test/contents_code/Doxyfile +++ b/doxygen/test/contents_code/Doxyfile @@ -1,4 +1,5 @@ INPUT = input.dox +EXAMPLE_PATH = . QUIET = YES GENERATE_HTML = NO GENERATE_LATEX = NO diff --git a/doxygen/test/contents_code/index.html b/doxygen/test/contents_code/index.html index 9aec3671..d0515d80 100644 --- a/doxygen/test/contents_code/index.html +++ b/doxygen/test/contents_code/index.html @@ -42,7 +42,9 @@ // a block // that is indented // but has a lot of trailing whitespace which should be removed -} +}

Look:

void foo() { return; }

A paragraph following a one line snippet should not be merged with it.

void foo() { return; }

This one also not.

#include <cmath>
+
+void bar() { return; }

And this should not produce a warning.

Another paragraph.

diff --git a/doxygen/test/contents_code/input.dox b/doxygen/test/contents_code/input.dox index cb1a9d80..c85d051a 100644 --- a/doxygen/test/contents_code/input.dox +++ b/doxygen/test/contents_code/input.dox @@ -28,6 +28,23 @@ But not when it is in (@code{.js} alert('www'); @endcode) parentheses. @endcode + +Look: + +@snippet snippet.cpp 0 + +A paragraph following a one line snippet should not be merged with it. + +@snippet snippet.cpp 0 +

+ +This one also not. + +@snippet snippet.cpp 1 + +And this should not produce a warning. + +Another paragraph. */ /** @page warnings Code that produces warnings diff --git a/doxygen/test/contents_code/snippet.cpp b/doxygen/test/contents_code/snippet.cpp new file mode 100644 index 00000000..a39068e7 --- /dev/null +++ b/doxygen/test/contents_code/snippet.cpp @@ -0,0 +1,9 @@ +/** [0] */ +void foo() { return; } +/** [0] */ + +/** [1] */ +#include + +void bar() { return; } +/** [1] */ -- 2.30.2