doxyrest
doxyrest copied to clipboard
Extra unwanted `.. ref-code-block:: c`
Extra .. ref-code-block:: c
appear in front of my code block whenever I use doxygen's \include
instead of \verbinclude
See this xml snippet (manually beautified):
<para><verbatim>
.. raw:: html
<div class="codeSample Ada" id="hello_world-adb">
</verbatim></para>
<para>
.. ref-code-block:: ada
<programlisting filename="hello_world.adb">
<codeline>
<highlight class="normal">
--<sp/>Simple<sp/>Program<sp/>"Hello<sp/>World"
</highlight>
</codeline>
<codeline>
<highlight class="normal">
with<sp/>MyLib;
</highlight>
</codeline>
This gets translated to the following rst
.. raw:: html
<div class="codeSample Ada" id="hello_world-adb">
.. ref-code-block:: ada
.. ref-code-block:: c
-- Simple Program "Hello World"
with MyLib;
Notice that extra unwanted .. ref-code-block:: c
This results in a first empty Ada code block, then a C code block with an Ada snippet, which messes up the syntax highlight:
If I swap out my \include
by an \verbinclude
, it works just fine but I need to use \skip
and \until
to include only part of the file, which is not possible with \verbinclude
. I want to do something similar to this example of \dontinclude
from doxygen's doc