breathe-doc / breathe

ReStructuredText and Sphinx bridge to Doxygen
https://breathe-doc.org
Other
735 stars 197 forks source link

En-dash in @return renders incorrectly #963

Open mcejp opened 6 months ago

mcejp commented 6 months ago

First of all, thank you so much for your work on this project. It really is a game changer for C++ docs.

Now, I'm struggling a bit to explain this problem concisely, but I think an example will make it very clear.

C++/Doxygen code:

    /**
     * Check if there is a message in the queue, and return its length.
     * This can be used to appropriately size the buffer for a subsequent call to read().
     *
     * @return The length of a pending message. This excludes the header -- a return value of 0 indicates a message
     *         with a header and an empty body. @b std::nullopt is returned if there is no message to read.
     */
    std::optional<size_t> getPendingMessageSize();

(this is inside a class, in case it makes any difference)

RST code:

.. doxygenclass:: bmboot::MessageQueueReader
   :members:

HTML output:

image

FWIW, the relevant part of the Doxygen XML looks like this:

This excludes the header <ndash/> a return value of 0 indicates a message with a header and an empty body.