Open History to see the last commit
1import { createFileRoute } from '@tanstack/react-router'
2import { TextPart } from '@tanstack/ai-react/ui'
3
4export const Route = createFileRoute('/markdown-cjk')({
5 component: MarkdownCjkPage,
6})
7
8// CommonMark refuses to close `**` when the closing delimiter is preceded by
9// full-width punctuation (e.g. `。`) and followed by a CJK letter, because the
10// right-flanking rule fails. TanStack Markdown does not apply that rule, so
11// CJK bold parses correctly without a plugin.
12const CJK_CONTENT = '**この文は太字になりません。**この文のせいで。'
13
14function MarkdownCjkPage() {
15 return (
16 <div className="p-6 max-w-2xl mx-auto space-y-8">
17 <h1 className="text-xl font-semibold">CJK bold rendering</h1>
18 <section data-testid="cjk-bold">
19 <TextPart content={CJK_CONTENT} />
20 </section>
21 </div>
22 )
23}