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

Exhale seems to eat asterisk-chars '*' #183

Open
schlatterbeck opened this issue Dec 19, 2022 · 1 comment
Open

Exhale seems to eat asterisk-chars '*' #183

schlatterbeck opened this issue Dec 19, 2022 · 1 comment

Comments

@schlatterbeck
Copy link

I have the following in a doxygen XML:

<simplesect kind="return"><para>None <verbatim>embed:rst:leading-asterisk

 Example
 -------

 Set the initialization routines to select a value for gene i
 uniformly randomly from the interval [0,i].  Assumes all strings
 are of the same length.

 .. code-block:: c

     PGAContext *ctx;
     int *low, *high, stringlen, i;

     stringlen = PGAGetStringLength (ctx);
     low  = malloc (stringlen * sizeof (int));
     high = malloc (stringlen * sizeof (int));
     for (i=0; i&lt;stringlen; i++) {
         low  [i] = 0;
         high [i] = i;
     }
     PGASetIntegerInitRange (ctx, low, high);</verbatim> </para>
</simplesect>

When converting this to a man page (or also when creating html) the first '*' in every line is missing:

EXAMPLE
       Set the initialization routines to select a value for gene i  uniformly
       randomly  from the interval [0,i].  Assumes all strings are of the same
       length.

       PGAContext  ctx;
       int  low, *high, stringlen, i;

       stringlen = PGAGetStringLength (ctx);
       low  = malloc (stringlen   sizeof (int));
       high = malloc (stringlen   sizeof (int));
       for (i=0; i<stringlen; i++) {
           low  [i] = 0;
           high [i] = i;
       }
       PGASetIntegerInitRange (ctx, low, high);

Note how the '*' before ctx, low and in malloc are missing.

I don't know if this is a bug in exhale or if the problem is occurring later in the toolchain. It seems that Doxygen is not at fault though.

@schlatterbeck
Copy link
Author

Looks like this is caused by

ALIASES                = "rst=\verbatim embed:rst:leading-asterisk"

This has the effect that in breathe/renderer/sphinxrenderer.py around line 1694 the first asterisk in each line is removed.
A questionable concept, a better implementation would only remove the first asterisk after leading whitespace? I was successful by just redefining this alias to

ALIASES                = "rst=\verbatim embed:rst"

by overriding this in my conf.py.

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