tomtom-international / asciidoxy

AsciiDoxy generates API documentation from Doxygen XML output to AsciiDoc.
Apache License 2.0
31 stars 10 forks source link

C++: Enum documentation wrong for enums with specific value and/or bitwise operation values #31

Closed ghost closed 2 years ago

ghost commented 3 years ago

Hi,

I've found another small issue.

If you have an enum like this:

enum class ESP32WiFiProtocol : uint8_t {
    eWIFI_11B = WIFI_PROTOCOL_11B,                                            ///< 802.11b
    eWIFI_11BG = WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G,                       ///< 802.11bg
    eWIFI_11BGN = WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N,  ///< 802.11bgn
    eWIFI_LR = WIFI_PROTOCOL_LR,                                              ///< ESP custom LR protocol
    eWIFI_11BGNLR = WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N | WIFI_PROTOCOL_LR,  ///< 802.11bgn+LR
    eERROR                                                                                         ///< error
};

It will get the following html representation:

image

It seems like there are parsing errors with enums having specific values or/and values consisting of bitwise operations.

Let me know if I can provide helpful information for a fix.

silvester747 commented 2 years ago

I can reproduce the issue. I need to make sure to escape the | as that is also the table cell separator in AsciiDoc.