From 4a0645e942ccff4f9cd5efd7082030a04e743852 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 14 Sep 2021 15:41:43 -0700 Subject: [PATCH] doc: Correctly render --DOC_NO_USAGE + --DOC_GEN_OUTPUT. It was previously merged into a single block. --- tests/examples/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/examples/CMakeLists.txt b/tests/examples/CMakeLists.txt index 83173cf6..71befc53 100644 --- a/tests/examples/CMakeLists.txt +++ b/tests/examples/CMakeLists.txt @@ -258,6 +258,12 @@ function(run_test test_path namespace escaped_content) "\n${expected_output}" "${TEST_DOC_CONTENT}" TEST_DOC_CONTENT " " ) + + # Add a
to prevent markdown from merging the usage and output + # into a single block. + if(tmp_content MATCHES "--DOC_NO_USAGE") + set(TEST_DOC_CONTENT "${TEST_DOC_CONTENT}\n${DOC_LINE_PREFIX} **Usage example:**") + endif() else() escape_string( "\n${expected_output}"