Skip to content

fix: resolve duplicate output in markdown lists separated by blank lines#116

Merged
k1LoW merged 1 commit intok1LoW:mainfrom
hanhan1978:fix/markdown-list-duplicate-parsing
Jun 15, 2025
Merged

fix: resolve duplicate output in markdown lists separated by blank lines#116
k1LoW merged 1 commit intok1LoW:mainfrom
hanhan1978:fix/markdown-list-duplicate-parsing

Conversation

@hanhan1978
Copy link
Contributor

Fixed issue where list items separated by blank lines were duplicated in the output. The problem occurred because both ListItem and its child Paragraph nodes were being processed separately by the AST walker.

Changes:

  • Skip processing paragraphs that are direct children of list items
  • Add test case for lists with blank lines
  • Preserve nested list functionality

sample markdown

# Lists with blank line

---

# Title

- First list item

- Second list item

before fix

CleanShot 2025-06-15 at 13 20 10

after fix

CleanShot 2025-06-15 at 13 22 48

Fixed issue where list items separated by blank lines were duplicated
in the output. The problem occurred because both ListItem and its child
Paragraph nodes were being processed separately by the AST walker.

Changes:
- Skip processing paragraphs that are direct children of list items
- Add test case for lists with blank lines
- Preserve nested list functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@k1LoW k1LoW added the bug Something isn't working label Jun 15, 2025
@k1LoW
Copy link
Owner

k1LoW commented Jun 15, 2025

@hanhan1978 GREAT!!! Thank you!!!

@k1LoW k1LoW merged commit 9e0f517 into k1LoW:main Jun 15, 2025
1 check passed
@github-actions github-actions bot mentioned this pull request Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants