fix(legacy-html): convert entry.changes to html#352
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.
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-hastand added acreateHistoryTableRowhelper to convert Markdown descriptions into HAST nodes. - Updated
buildMetadataElementto accept the Remark processor and use the new helper for the changes table. - Added the
mdast-util-to-hastdependency 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
createHistoryTableRowJSDoc block is missing an@returnstag. 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
createHistoryTableRowto verify that various Markdown inputs indescriptionare 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 testand all tests passed.node --run format&node --run lint.