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

Javadoc: type attribute of ordered lists not preserved (in xml) #8522

Closed
Stewori opened this issue Apr 27, 2021 · 4 comments
Closed

Javadoc: type attribute of ordered lists not preserved (in xml) #8522

Stewori opened this issue Apr 27, 2021 · 4 comments
Labels

Comments

@Stewori
Copy link

Stewori commented Apr 27, 2021

Describe the bug
Processing Java code

/**
 * Doxygen does not preserve the type attribute of ordered lists:
 *
 * <ol type="a">
 *   <li>an item</li>
 *   <li>another item</li>
 *   <li>yet another item</li>
 * </ol>
 */
public class Test {}

results in the following xml:

...
<orderedlist>
<listitem>
<para>an item </para>
</listitem>
<listitem>
<para>another item </para>
</listitem>
<listitem>
<para>yet another item </para>
</listitem>
</orderedlist>
...

It is now impossible to know that the author intended alphabetical numbering. This can become an issue if the text references list items by their letter rather than by number.

Expected behavior
I expect the xml output to preserve the type attribute of html's ol tag, e.g. like this

...
<orderedlist type="a">
<listitem>
<para>an item </para>
</listitem>
<listitem>
<para>another item </para>
</listitem>
<listitem>
<para>yet another item </para>
</listitem>
</orderedlist>
...

To Reproduce
Find a Java file and doxygen config attached. The issue is demonstrated like mentioned above.
After running doxygen on the example, the files in the subfolder xml contain the snippet shown above.
issue_javadoc_ol_type.zip

Version
Tested with doxygen clone from 2021-04-11:

/blah/doxygen/build/bin/doxygen -v
1.9.2 (e9185650216f3c3fa97759caf67ee79db66cb5e1)

lsb_release -a:

LSB Version:	core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID:	LinuxMint
Description:	Linux Mint 18 Sarah
Release:	18
Codename:	sarah

Additional context
A situation where this issue is relevant occurs in the Java standard library in java.util.ServiceLoader:

...
 * <pre>{@code
 *     ServiceLoader<CodecFactory> loader = ServiceLoader.load(CodecFactory.class);
 *     Set<CodecFactory> pngFactories = loader
 *            .stream()                                              // Note a below
 *            .filter(p -> p.type().isAnnotationPresent(PNG.class))  // Note b
 *            .map(Provider::get)                                    // Note c
 *            .collect(Collectors.toSet());
 * }</pre>
 * <ol type="a">
 *   <li> A stream of {@code Provider<CodecFactory>} objects </li>
 *   <li> {@code p.type()} yields a {@code Class<CodecFactory>} </li>
 *   <li> {@code get()} yields an instance of {@code CodecFactory} </li>
 * </ol>
...
albert-github added a commit to albert-github/doxygen that referenced this issue Apr 29, 2021
…rved (in xml)

The problem was a bit deeper, it was also valid for other output formats.
Implemented the `type` and `start` attribute for all relevant output types.
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #8523

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Apr 30, 2021
@albert-github
Copy link
Collaborator

Code has been integrated in master on github (please don't close the issue as this will be done at the moment of an official release).

@Stewori
Copy link
Author

Stewori commented Apr 30, 2021

Cool. Thanks!

@doxygen
Copy link
Owner

doxygen commented Aug 18, 2021

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.2.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 18, 2021
@doxygen doxygen closed this as completed Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants