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

feat(dgeni): automatically generate API doc links for code span in markdown #2964

Merged
merged 1 commit into from
Aug 10, 2024

Conversation

griest024
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Fixes: #2474

What is the new behavior?

Code spans in markdown files that match an API symbols will get automatically wrapped in an anchor pointing to the API doc page.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

There's an important gotcha here. There's not a good way to check if the code span is already wrapped in a link so any code span that links to package guides with a code span will be double wrapped. For that reason, guide links should not use code spans. e.g.
incorrect:

[`@daffodil/cart`](/libs/cart/README)

correct:

[@daffodil/cart](/libs/cart/README)

@griest024 griest024 added status: awaiting merge This PR has met all the requirements for merge and is waiting on an admin tools: dgeni @daffodil/tools-dgeni labels Aug 9, 2024
@griest024 griest024 self-assigned this Aug 9, 2024
@griest024 griest024 requested review from a team as code owners August 9, 2024 23:10
@griest024 griest024 merged commit c3a1ad3 into graycoreio:develop Aug 10, 2024
30 checks passed
@gray-bot gray-bot mentioned this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting merge This PR has met all the requirements for merge and is waiting on an admin tools: dgeni @daffodil/tools-dgeni
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Link to API docs from markdown guides
1 participant