-
Notifications
You must be signed in to change notification settings - Fork 14
fix(legacy-html): convert entry.changes to html #352
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
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #352 +/- ##
=======================================
Coverage 72.12% 72.13%
=======================================
Files 117 117
Lines 9984 9997 +13
Branches 597 597
=======================================
+ Hits 7201 7211 +10
- Misses 2780 2783 +3
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 ensures that entry.changes
descriptions are parsed from Markdown into HTML when generating legacy HTML docs.
- Imported
mdast-util-to-hast
and added acreateHistoryTableRow
helper to convert Markdown descriptions into HAST nodes. - Updated
buildMetadataElement
to accept the Remark processor and use the new helper for the changes table. - Added the
mdast-util-to-hast
dependency inpackage.json
.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/generators/legacy-html/utils/buildContent.mjs | Imported toHast , added createHistoryTableRow , updated buildMetadataElement signature and usage to convert change descriptions to HTML. |
package.json | Added mdast-util-to-hast to dependencies. |
Comments suppressed due to low confidence (2)
src/generators/legacy-html/utils/buildContent.mjs:81
- The
createHistoryTableRow
JSDoc block is missing an@returns
tag. Adding a description of the return value (an HAST<tr>
element) would improve clarity.
* Creates a history table row.
src/generators/legacy-html/utils/buildContent.mjs:86
- Consider adding unit tests for
createHistoryTableRow
to verify that various Markdown inputs indescription
are correctly converted to HTML elements.
const createHistoryTableRow = (
It was an accident haha @avivkeller I pushed it by mistake |
No problem, I thought it was funny 🤭 |
Description
Fix conversion of entry.changes to HTML.
Validation
Related Issues
Fixes #326
Check List
node --run test
and all tests passed.node --run format
&node --run lint
.