Bug Description
Autolink literals in CJK text treat fullwidth punctuation as part of the URL when there is no whitespace. Example: 请访问 https://example.com。谢谢 becomes a link to https://example.com。谢谢, so the punctuation and following CJK text are swallowed by the link.
Steps to Reproduce
import { Streamdown } from "streamdown";
export default function App() {
const markdown = "请访问 https://example.com。谢谢";
return <Streamdown>{markdown}</Streamdown>;
}
Expected Behavior
- Link text/href:
https://example.com
- Trailing text
。谢谢 remains plain text
Actual Behavior
- Link text/href includes the trailing CJK punctuation and text:
https://example.com。谢谢
Environment
- streamdown: 1.6.10
- remark-gfm: 4.0.1 (default)
Additional Context
CJK emphasis is handled via remark-cjk-friendly, but autolink literal boundaries still follow GFM behavior. This feels related to trailing punctuation issues in autolinks (e.g. remarkjs/remark-gfm#12), but fullwidth CJK punctuation is not treated as a boundary.
Bug Description
Autolink literals in CJK text treat fullwidth punctuation as part of the URL when there is no whitespace. Example:
请访问 https://example.com。谢谢becomes a link tohttps://example.com。谢谢, so the punctuation and following CJK text are swallowed by the link.Steps to Reproduce
Expected Behavior
https://example.com。谢谢remains plain textActual Behavior
https://example.com。谢谢Environment
Additional Context
CJK emphasis is handled via remark-cjk-friendly, but autolink literal boundaries still follow GFM behavior. This feels related to trailing punctuation issues in autolinks (e.g. remarkjs/remark-gfm#12), but fullwidth CJK punctuation is not treated as a boundary.