删除doxygen \ snippet中的前导缩进/空白

时间:2019-05-02 15:18:51

标签: c++ doxygen

我正在doxygen 1.8.14中使用\snippet examples.cpp xml_map::fixup命令来生成以下内容...

enter image description here

这是从以下单元测试代码派生的...

    TEST_METHOD(fixup) {
        /// [xml_map::fixup]
        // The source xml, but with elements missing, unmapped elements,
        // and elements in a different order than in the map.
        std::string xml{
            "<map>\n"
            "\t<first_unmapped_element/>\n"
            "\t<double_element/>\n"
            "\t<second_unmapped_element/>\n"
            "\t<bool_element/>\n"
            "</map>\n"
        };

        xml::xml_map<map_elements> xml_map(xml, map);

        // Mapped elements that are missing from the source xml are added, elements
        // not mapped are removed, and elements are sorted according to their order in the map.
        xml_map.fixup();

        std::string expected_xml{
            "<map>\n"
            "\t<bool_element/>\n"
            "\t<double_element/>\n"
            "\t<array_element/>\n"
            "</map>\n"
        };
        Assert::AreEqual(expected_xml.c_str(), xml_map.xml().c_str());
        /// [xml_map::fixup]
    }

缩进是由于代码属于单元测试方法的一部分,而该代码属于单元测试类的一部分,而该单元测试类位于名称空间下,导致在代码段之前出现了三个缩进级别。基本上,氧气完全反映了单元测试方法的空白。我希望我的doxygen输出看起来像这样...

enter image description here

我已经浏览了doxygen文档,但找不到是否可行。任何提示或解决方案都表示赞赏。

0 个答案:

没有答案