Strong ending in nested emphasis (`**bold *italic***`) closes early and leaves a literal `*`
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- markdown, typescript
- 領域
- backend
調査の方向性
Start at the Markdown emphasis parsing entry point and its tests; the issue does not name specific files, so first locate how delimiter runs are matched. Reproduce the nested and flanking cases from the report and compare output with micromark 4.0.2. Done means all listed inputs produce the expected CommonMark HTML, including the already working reverse nesting case.
索引モデルが issue の本文から書いたものです。
説明
Summary
When a strong span ends with a nested emphasis span, so that the closing run is ***, @tanstack/markdown closes the <strong> early and leaves a literal * behind. The reverse case (*outer **inner***) already works.
This is common in real content. MDXEditor's Markdown serializer, for example, writes bold text ending in an italic title exactly as **25 years of *Title***, so content produced by that editor renders with stray asterisks.
Environment
@tanstack/markdown1.0.0,renderHtmlfrom@tanstack/markdown/html. The React adapter shows the same output.- Node 24
- Reference:
micromark4.0.2 (CommonMark)
Reproduction
import { renderHtml } from '@tanstack/markdown/html'
renderHtml('**bold *italic***')
renderHtml('**25 years of *Title***, the debut album.')
renderHtml('***Iceman*, *Maid of Honour* and *Habibti***')
| Input | @tanstack/markdown 1.0.0 |
micromark 4.0.2 (expected) |
|---|---|---|
**bold *italic*** |
<p><strong>bold *italic</strong>*</p> |
<p><strong>bold <em>italic</em></strong></p> |
**25 years of *Title***, the debut album. |
<p><strong>25 years of *Title</strong>*, the debut album.</p> |
<p><strong>25 years of <em>Title</em></strong>, the debut album.</p> |
***Iceman*, *Maid of Honour* and *Habibti*** |
<p><em><strong>Iceman<em>, </em>Maid of Honour<em> and </em>Habibti</strong></em></p> |
<p><strong><em>Iceman</em>, <em>Maid of Honour</em> and <em>Habibti</em></strong></p> |
*outer **inner*** (works) |
<p><em>outer <strong>inner</strong></em></p> |
same |
Related flanking cases (in addition to #28)
#28 covers a * with whitespace on both sides. These two variants also open or close where CommonMark does not:
| Input | @tanstack/markdown 1.0.0 |
micromark 4.0.2 (expected) |
|---|---|---|
**VIP pass **: entry included |
<p><strong>VIP pass </strong>: entry included</p> |
<p>**VIP pass **: entry included</p> |
Seats CSI5* and CSI1*, both sold |
<p>Seats CSI5<em> and CSI1</em>, both sold</p> |
<p>Seats CSI5* and CSI1*, both sold</p> |
- First row: the closing
**is preceded by whitespace, so it is not right-flanking. - Second row: the first
*is followed by whitespace, so it is not left-flanking.
Context
We compared @tanstack/markdown against a corpus of about 4,000 real Markdown documents. These emphasis cases account for most of the visible differences. They are the only thing blocking us from adopting it.
- 主要言語
- TypeScript
- スター
- 432
- フォーク
- 11
- 平均マージ
- 57分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/markdown のほかの issue
-
A blockquote with U+2028 or U+2029 loops the parser forever対応中かも @elwan-l1 が 19 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
-
難易度 3/5 半日 初心者へのやさしさ 70/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
TanStack/markdown の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Clouditera/VulnHunter#57 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug bug:behavior clawsweeper:bulk-filed clawsweeper:fix-shape-clear clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster P2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
openclaw/openclaw#185297 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apex-dev-tools/apex-log-parser#199 ·
メンテナーはふだん 1 日以内に返信