-
Notifications
You must be signed in to change notification settings - Fork 13
fix(parser): transform man pages #349
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #349 +/- ##
==========================================
- Coverage 72.17% 72.12% -0.05%
==========================================
Files 117 117
Lines 9936 9984 +48
Branches 597 597
==========================================
+ Hits 7171 7201 +30
- Misses 2762 2780 +18
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR adds support for transforming Unix manual page references (e.g., chmod(1)
) into links to the Man7 documentation.
- Imported and wired up a new
transformUnixManualToLink
transformer in both the parser and query layers - Added a
DOC_MAN_BASE_URL
constant and corresponding regex/query for Unix manuals - Updated the metadata generator to visit and transform manual-page references
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
src/utils/queries/index.mjs | Added unixManualPage regex, updateUnixManualReference , and isTextWithUnixManual |
src/utils/parser/constants.mjs | Defined DOC_MAN_BASE_URL for Man7 manual links |
src/utils/parser/index.mjs | Exported transformUnixManualToLink transformer |
src/generators/metadata/utils/parse.mjs | Added AST visitor for Unix manual references |
Comments suppressed due to low confidence (1)
src/generators/metadata/utils/parse.mjs:132
- [nitpick] No test coverage appears to be added for the new Unix manual transformer. Consider writing unit tests to validate
transformUnixManualToLink
output and thevisit
behavior.
visit(
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.
LGTM!! tysm for fixing this <3
Fixes #346 by adding a transformer for Unix Manual syntax. That way, when
chmod(1)
(or similar) is put the documentation, it'll link to the https://man7.org/linux/man-pages/ reference.