Skip to content

Proper AST translation for hover docs #426

@varungandhi-src

Description

@varungandhi-src

We literally just take the hover doc and jam it into Markdown.

However, it's usually written using Doxygen markup, not Markdown. So we need to synthesize a Doxygen AST -> convert that to Markdown.

https://sourcegraph.com/github.com/NVIDIA/MDL-SDK@190249748ddfe75b133b9da9028cc6272928c1b5/-/blob/include/mi/neuraylib/target_code_types.h?L1079

Here's one example where that falls down. Newlines just continue the paragraph in Markdown. But Doxygen uses \param to mark parameter lists.

image

For the param-specific issue, we could potentially just hack it by adding some ad-hoc translation. E.g. if the start of the line has \param <blah>, then emit * <blah>.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions