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

TypeDoc generates broken links for {@linkcode ...} comments #482

Open
mrousavy opened this issue Oct 10, 2023 · 9 comments
Open

TypeDoc generates broken links for {@linkcode ...} comments #482

mrousavy opened this issue Oct 10, 2023 · 9 comments

Comments

@mrousavy
Copy link
Contributor

Hey!
Thanks for this amazing plugin, I use TypeDoc to generate API documentation for react-native-vision-camera! ❤️

I am using {@linkcode } blocks, (see code here), but for some reason the output links are broken:

Exhaustive list of all broken links found
-> linking to CameraDeviceFormat.md#maxfps (resolved as: /docs/api/interfaces/CameraDeviceFormat.md)

Screenshot 2023-10-10 at 18 15 16

Is there any way to configure that? Or am I using {@linkcode ...} wrong?

@mrousavy
Copy link
Contributor Author

(The problem is the .md suffix, it needs to be generated without .md, then it's a valid link)

@mrousavy
Copy link
Contributor Author

The issue occurs only when there's many {@linkcode ...} statements close by, weirdly if I add text inbetween those links it compiles fine...

@tgreyuk
Copy link
Member

tgreyuk commented Oct 20, 2023

So I have done a bit of digging and {@linkcode} is parsing correctly but there does seem to be a Docusaurus bug in resolving broken links when a link is immediately followed by a parenthesis.

broken:
[label](page.md#anchorName) (see [label](page.md#anchorName))

ok:
see ([label](page.md#anchorName))

ok:
[label](page.md#anchorName) - (see [label](page.md#anchorName))

@mrousavy
Copy link
Contributor Author

Interesting! Thanks for your insights, I guess this should be reported in the Docusaurus repo then?

@tgreyuk
Copy link
Member

tgreyuk commented Oct 23, 2023

I guess this should be reported in the Docusaurus repo then?

Yes I think so - I'll do a bit more investigation and raise a ticket.

@mrousavy
Copy link
Contributor Author

Awesome, thank you I appreciate it! 🙏

@bo-carey
Copy link

bo-carey commented Nov 8, 2023

@tgreyuk - I am also experiencing this bug. Have you made a ticket?

@tgreyuk
Copy link
Member

tgreyuk commented Nov 19, 2023

Thanks @bo-carey i was just looking at this and i notice you have already raised a ticket. I am linking to it here as a reference - facebook/docusaurus#9518 .

@bo-carey
Copy link

@tgreyuk thanks for that, Tom!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants