Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra unwanted .. ref-code-block:: c #48

Open
yanis-fourel opened this issue Dec 13, 2021 · 0 comments
Open

Extra unwanted .. ref-code-block:: c #48

yanis-fourel opened this issue Dec 13, 2021 · 0 comments

Comments

@yanis-fourel
Copy link

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   
   &lt;div class=&quot;codeSample Ada&quot; id=&quot;hello_world-adb&quot;&gt;
</verbatim></para>
<para>
    .. ref-code-block:: ada
    <programlisting filename="hello_world.adb">
        <codeline>
            <highlight class="normal"> 
                --<sp/>Simple<sp/>Program<sp/>&quot;Hello<sp/>World&quot;
            </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:

image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant