Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Strong ending in nested emphasis (`**bold *italic***`) closes early and leaves a literal `*`

オープン
#32 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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/markdown 1.0.0, renderHtml from @tanstack/markdown/html. The React adapter shows the same output.
  • Node 24
  • Reference: micromark 4.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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/markdown のほかの issue

TanStack/markdown の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。