-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(docx): Missing list items after numbered header (#2665) #2678
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?
fix(docx): Missing list items after numbered header (#2665) #2678
Conversation
…2665) This commit fixes an issue where list items immediately following headings (especially numbered headings) were not being processed correctly in Word documents. Changes: * Clear list history after headings to allow new lists to start * Reset level tracking when heading resets hierarchy * Reset level_at_new_list when a heading is added * Replace else block with explicit elif condition for new list sequences - Only continue existing list if parent is actually a ListGroup - Handle different numid or missing ListGroup parent by creating new list Added test case to verify list items appear after numbered headings. Signed-off-by: Emre Çalışır <[email protected]>
|
✅ DCO Check Passed Thanks @emreclsr, all your commits are properly signed off. 🎉 |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 Require two reviewer for test updatesThis rule is failing.When test data is updated, we require two reviewers
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Improves test coverage for the list-after-heading fix by adding a test case for enumerated (numbered) lists following headings. Changes: * Extended list_after_num_headers.docx with numbered list test case - Added "Title 2" section with "Sub Title 1" heading - Added enumerated list items (1-3) directly after heading * Updated test_list_items_after_numbered_heading to verify both: - Bullet lists after headings (existing test) - Enumerated lists after headings (new test) * Updated groundtruth files (.md, .itxt, .json) to reflect new content Signed-off-by: Emre Çalışır <[email protected]>
DescriptionThis PR improves test coverage for the list-after-heading fix by adding test cases for enumerated (numbered) lists following headings, achieving 100% code coverage for the related changes. ChangesTest Data
Test Code
Groundtruth Files
|
Description
This commit fixes an issue where list items immediately following headings (especially numbered headings) were not being processed correctly in Word documents.
While working with Word document conversion, I encountered a similar issue to #2665 where list items after headings were missing from the output. This PR addresses the root cause of this problem.
Changes
elseblock with explicitelifcondition for new list sequencesTesting
Added test case
test_list_items_after_numbered_headingto verify:All existing tests continue to pass. No groundtruth files were modified, indicating the fix addresses the bug without breaking existing functionality.
Related Issues
This fix may also resolve #2665 as it addresses the same underlying problem.
Checklist
test_list_items_after_numbered_heading