Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses issue #321 by ensuring that list nodes conform to an expected structure before parsing them as options. The changes include introducing the isTypedList helper function to validate that a list starts with an inline code block, followed by a space and a link whose first character is '<', and updating parseListItem to use this check for recursive option parsing.
Comments suppressed due to low confidence (1)
src/generators/legacy-json/utils/parseList.mjs:51
- The condition verifies for whitespace by trimming the value. Given the PR description requires a single space, consider using an exact comparison (e.g., children?.[1]?.value === ' ') to enforce the expected structure.
children?.[1]?.value.trim() === '' &&
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #322 +/- ##
==========================================
+ Coverage 66.57% 66.76% +0.19%
==========================================
Files 81 81
Lines 6956 6981 +25
Branches 339 343 +4
==========================================
+ Hits 4631 4661 +30
+ Misses 2322 2317 -5
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
FYI Requesting fast track since this functionality is need for building the tables in the web generator |
|
Feel free to approve, I just need to add tests, and fix one thing, which I’ll do tomorrow. |
Fixes #321 by verifying the list meets the following structure before parsing it as a list of options:
code<