Skip to content
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

Docs: function parameters #3777

Closed
AndreKR opened this issue Aug 26, 2023 · 1 comment
Closed

Docs: function parameters #3777

AndreKR opened this issue Aug 26, 2023 · 1 comment

Comments

@AndreKR
Copy link

AndreKR commented Aug 26, 2023

The docs builder simplifies the headings here:

.replace(/(## [A-Za-z0-9]+)[^\n]*/g, '$1') // simplify headings to match those of documentationjs, ensures existing URLs work

I'm assuming this is because you previously used documentation.js and wanted to keep the anchors the same.

The issue with that is that it's not really clear that for example in the following screenshot [angle] and [options] are the first and the second parameter of rotate():

image

Took me a while to understand that I'm not supposed to pass an object with angle and options keys.

I took a look at how documentation.js deals with this and while it's also not great IMO, the indentation does make it more clear:

image

Anyway, maybe you could add the full method signature as a code block right below the header? That would be easily doable just by extending the regex replace.

@lovell
Copy link
Owner

lovell commented Aug 29, 2023

Thanks for reporting this, commit 67e927b ensures method signatures are included below headings.

@lovell lovell closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants