Strong ending in nested emphasis (`**bold *italic***`) closes early and leaves a literal `*`
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- markdown, typescript
- Área
- backend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 432
- Forks
- 11
- Merge medio
- 57 min
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/markdown
-
A blockquote with U+2028 or U+2029 loops the parser foreverPosiblemente ocupada @elwan-l1 la tomó hace 18 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
-
Dificultad 3/5 Medio día Aptitud para principiantes 70/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Todos los issues de TanStack/markdown
Issues similares
-
Native Web
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
digitalfabrik/integreat-app#4517 ·
Los mantenedores suelen responder en 2 días
-
TLS guide repeats certs/ in the certificate directoryPosiblemente ocupada @maheshrijal la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
prometheus/docs#3156 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
medusajs/dtc-starter#90 ·
Los mantenedores suelen responder en 1 día
-
usability
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
inmanta/web-console#7632 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
zaidmukaddam/scira#261 ·