Table copy and download lose header cells in body rows, image cells, and tables without a header row
I maintainer di solito rispondono entro 1 giorno
@AbbasFullstack ci sta già lavorando.
Dal 12/11/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 62/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- html, markdown, react, typescript
- Ambito
- frontend
Direzione di ricerca
L'estrazione delle tabelle si trova in extractTableDataFromElement e tableDataToMarkdown; inizia leggendo come vengono selezionate le righe del corpo e come vengono lette le celle immagine. Riproduci con le due tabelle nell'issue: la prima deve mantenere il testo alternativo e la seconda deve mantenere Revenue e Costs come Markdown valido con una riga di intestazione vuota. È completato quando entrambi i percorsi di copia mantengono ogni cella e i test esistenti sulle tabelle continuano a passare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug Description
Table copy and download (Markdown, CSV and TSV) read the table with extractTableDataFromElement, which loses content in three cases:
- Header cells in body rows are dropped. It reads only
tdintbody tr. This happens with HTML tables that use row headers, such as<tr><th>Revenue</th><td>100</td></tr>. - Images lose their alt text. It takes only text content. A cell with
is copied as "Image not available" if the image failed to load, or as an empty cell if it loaded. - A table without a header row copies as an empty string.
tableDataToMarkdownreturns""when there are no headers, so the whole table is lost.
Steps to Reproduce
- Open https://streamdown.ai/playground and replace the input with:
| Logo | Name | | --- | --- | |  | Acme | <table><tbody><tr><th>Revenue</th><td>100</td></tr><tr><th>Costs</th><td>40</td></tr></tbody></table> - On the first table, choose Copy table → Markdown.
- On the second table, choose Copy table → Markdown.
Expected Behavior
- First table:
| Acme logo | Acme |, or Markdown image syntax for the cell. - Second table: a valid table that keeps every cell, including
RevenueandCosts. For example, it could use an empty header row so the GFM table stays valid.
Actual Behavior
- First table:
| Image not available | Acme |, because the image failed to load. From the source, a loaded image gives an empty cell. - Second table: an empty string. From the source, CSV and TSV keep only
100and40; the row headers are lost.
Code Sample
<Streamdown>
{"<table><tbody><tr><th>Revenue</th><td>100</td></tr></tbody></table>"}
</Streamdown>
Streamdown Version
2.7.1
React Version
19.3.1
Browser(s)
Chrome (desktop)
Operating System
macOS
Additional Context
Possible fixes in extractTableDataFromElement / tableDataToMarkdown:
- read
th, tdin body rows; - use
img.alt(or) for image cells, and skip the image fallback and download button; - when there are no headers, emit an empty header row and delimiter rather than returning
"".
Related: #553 (line breaks in cells), which is already fixed.
- Lingua principale
- TypeScript
- Stelle
- 5.8k
- Fork
- 334
- Merge medio
- 2g 4h
- PR unite (30g)
- 33
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vercel/streamdown
-
remend: unclosed `$$` in a table cell is closed on a new line when an earlier line has mathForse già presa @orinnz l’ha presa 43 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
vercel/streamdown#652 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
vercel/streamdown#731 ·
I maintainer di solito rispondono entro 1 giorno
-
Mermaid shows no error when a previously valid chart becomes invalidForse già presa @biggdawg320 l’ha presa 5 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
vercel/streamdown#724 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
vercel/streamdown#719 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
vercel/streamdown#699 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di vercel/streamdown
Issue simili
-
Bug: Broken RTL / BiDi text rendering when mixing Persian (Farsi) with English or numbersForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
amosblomqvist/learnharness#758 ·
I maintainer di solito rispondono entro 2 giorni
-
Change WorkspacesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dsh-market/dsh-market#1210 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
trustjonathan/STUDY-HUB#13 ·