-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated JSON documentation no longer includes methods
field.
#31290
Comments
Yikes. Here's the relevant computed regexp: |
@Me1000 Can you check if this patch fixes the problem for you? It seems to fix it for me.
Also, I don't suppose you've checked to see if any of the other elements (class, ctor, classMethod, event, property) have missing entries too? |
#31294 should fix this problem for methods. Further research is probably necessary to see if this needs to be done for the other regular expressions ((class, ctor, classMethod, event, property) or not. |
Heh, I guess that could just be:
|
Looks like this bug effects events too. |
Class names too. Probably all of them. I'll add 'em to the PR. |
Methods, events, and so on in headers in our documentation may (and should) be set off with backticks in the raw markdown. When that happens, the headers is misinterpreted by tools/json.js as not being a method or event. Update the JSON tool generator to accommodate backticks in this situation and add a test for this situation. Fixes: #31290 PR-URL: #31294 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Methods, events, and so on in headers in our documentation may (and should) be set off with backticks in the raw markdown. When that happens, the headers is misinterpreted by tools/json.js as not being a method or event. Update the JSON tool generator to accommodate backticks in this situation and add a test for this situation. Fixes: #31290 PR-URL: #31294 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Methods, events, and so on in headers in our documentation may (and should) be set off with backticks in the raw markdown. When that happens, the headers is misinterpreted by tools/json.js as not being a method or event. Update the JSON tool generator to accommodate backticks in this situation and add a test for this situation. Fixes: #31290 PR-URL: #31294 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR #31086 Changed the markdown styling for documentation. This introduced a bug in the JSON documentation which gets generated with the release. Specifically the
methods
field is no longer there:e.g. in 13.5.0:
In 13.6.0▶️ :
It looks like this regex no longer matched: https://github.com/nodejs/node/blob/master/tools/doc/json.js#L475
Since they're really only used for the HTML styling, I think a simple fix might be to just strip the tick marks here:
node/tools/doc/json.js
Line 482 in 9d5d4f8
I can submit a PR if others agree with this simple solution.EDIT: Unfortunately that simple solution will not work. There were some existing headings with tick marks that parse incorrectly if they're removed. Continuing to investigate, but I'm still not super familiar with this code.
The text was updated successfully, but these errors were encountered: