Skip to content

Member detail tables do not escape "|" in descriptions #149

Open

Description

@trackoor

Descriptions in the member detail tables (Parameters, Return Values, Exceptions, and enum values) are emitted without escaping |, unlike the summary tables which pass descriptions through {{cell ...}}.

file.h:

/// File utility.
class File {
public:
  /// Opens a file with O_RDONLY | O_WRONLY.
  /// @param flags O_RDONLY | O_WRONLY, or 0 for defaults.
  static File open(int flags);
};

Doxyfile:

INPUT = file.h
GENERATE_HTML = NO
GENERATE_LATEX = NO
GENERATE_XML = YES
QUIET = YES

Commands:

doxygen Doxyfile
npx moxygen -q -o api.md xml

Actual output in api.md (relevant sections):

### Public Static Methods

| Return | Name | Description |
|--------|------|-------------|
| [`File`](#file) | [`open`](#open) `static` | Opens a file with O_RDONLY \| O_WRONLY. |
##### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `flags` | `int` | O_RDONLY | O_WRONLY, or 0 for defaults. |

In CommonMark / GitHub Flavored Markdown, the Parameters row has four cells, so renderers show O_RDONLY as the description and discard O_WRONLY, or 0 for defaults. (this also happens when the flag expression is wrapped in backticks such as `O_RDONLY | O_WRONLY`).

Expected output for Parameters:

| Parameter | Type | Description |
|-----------|------|-------------|
| `flags` | `int` | O_RDONLY \| O_WRONLY, or 0 for defaults. |

templates/cpp/_member.md and templates/java/_member.md render raw {{description}} (for Parameters, Return Values, and Exceptions) and {{summary}} (for enumvalue) instead of {{cell description}} and {{cell summary}}.

Versions: moxygen@2.2.3 and main (acdd314), Doxygen 1.9.4, Node.js v26.13.0.

Credit: https://ucsbplse.github.io/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions