nodejs / api-docs-tooling

Node.js's tooling for API generation
https://nodejs.org/api
MIT License
5 stars 5 forks source link

Incorrect Heading Type in Parser #139

Closed RedYetiDev closed 4 days ago

RedYetiDev commented 1 week ago

In the parser, there is the following code snippet: https://github.com/nodejs/api-docs-tooling/blob/main/src/utils/parser.mjs#L121-L134

If a type cannot be determined, it defaults to module, however this is not the case in the legacy generator. In the legacy generator, it will be misc if the parent is misc, and module otherwise.

https://github.com/nodejs/node/blob/0a00217a5f67ef4a22384cfc80eb6dd9a917fdc1/tools/doc/json.mjs#L202-L207

I'm formulating a patch now, but I figured I'd open this for record-keeping / verifying this is unexpected.