Skip to content

fix bug with terminating lists on certain models#49

Merged
haydenbleasel merged 2 commits intomainfrom
33-bug-with-terminating-lists-on-certain-models
Aug 27, 2025
Merged

fix bug with terminating lists on certain models#49
haydenbleasel merged 2 commits intomainfrom
33-bug-with-terminating-lists-on-certain-models

Conversation

@haydenbleasel
Copy link
Contributor

This pull request addresses a bug in the streamdown package where asterisks used as list markers were incorrectly counted as formatting characters, leading to improper markdown completion. The main fix ensures that list items using asterisks are handled correctly and not terminated with an extra asterisk. Unit tests have been added to cover various list scenarios and edge cases.

Bug fix for asterisk list handling

  • Updated the logic in countSingleAsterisks within packages/streamdown/lib/parse-incomplete-markdown.ts to detect and ignore asterisks used as list markers, preventing them from being counted as formatting characters. [1] [2]

Test coverage improvements

  • Added multiple unit tests in packages/streamdown/__tests__/parse-incomplete-markdown.test.ts to verify correct handling of lists with asterisk markers, nested lists, lists with italic formatting, mixed markers, tab-indented lists, and dash lists.

Documentation

  • Added a changeset entry describing the patch fix for asterisk list termination in .changeset/fancy-snails-march.md.

@haydenbleasel haydenbleasel linked an issue Aug 27, 2025 that may be closed by this pull request
@vercel
Copy link
Contributor

vercel bot commented Aug 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
streamdown Ready Ready Preview Comment Aug 27, 2025 4:01am

@haydenbleasel haydenbleasel merged commit 5fbad80 into main Aug 27, 2025
6 checks passed
@haydenbleasel haydenbleasel deleted the 33-bug-with-terminating-lists-on-certain-models branch August 27, 2025 04:01
own-boldsbrain pushed a commit to own-boldsbrain/streamdown that referenced this pull request Sep 22, 2025
* fix asterisk list termination

* Create fancy-snails-march.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug with terminating lists on certain models

1 participant