-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add src-link generator #78
base: main
Are you sure you want to change the base?
Conversation
package.json
Outdated
@@ -30,7 +30,8 @@ | |||
"prepack": "pnpm build", | |||
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags && pnpm build --stub", | |||
"test": "pnpm lint && pnpm test:types && vitest run --coverage", | |||
"test:types": "tsc --noEmit --skipLibCheck" | |||
"test:types": "tsc --noEmit --skipLibCheck", | |||
"test:generators": "vitest run test/generators" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please extend existing tests? 🙏🏼
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
=======================================
Coverage ? 77.55%
=======================================
Files ? 18
Lines ? 1114
Branches ? 158
=======================================
Hits ? 864
Misses ? 249
Partials ? 1 ☔ View full report in Codecov by Sentry. |
|
||
<!-- automd:src-link url="gh:nuxt/nuxt/blob/main/packages/schema/src/types/hooks.ts" pattern="\"export" interface NuxtHooks" label="\"schema" source code" --> | ||
|
||
<!-- ⚠️ Unknown generator:`src-link`. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to register the generator in the config/automd
This PR introduces a new generator called
src-link
for AutoMD. The generator allows users to create Markdown links to specific lines in source code files:Examples:
GitHub URLs
Will produce:
GitHub URLs with Regex
Will produce:
Relative URLs
Will produce:
Check the test cases to see more options.
Related #77