Table copy and download lose header cells in body rows, image cells, and tables without a header row
メンテナーはふだん 1 日以内に返信
@AbbasFullstack がすでに取り組んでいます。
2026年11月12日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- html, markdown, react, typescript
- 領域
- frontend
調査の方向性
表の抽出処理は extractTableDataFromElement と tableDataToMarkdown にあります。まず、本文の行がどのように選択されるか、画像セルがどのように読み取られるかを読んでください。issue にある2つの表で再現してください。1つ目は alt テキストを保持する必要があり、2つ目は空のヘッダー行を持つ有効な Markdown として Revenue と Costs を保持する必要があります。両方のコピー経路がすべてのセルを保持し、既存の表のテストが引き続き成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 5.8k
- フォーク
- 334
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 33
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel/streamdown のほかの issue
-
remend: unclosed `$$` in a table cell is closed on a new line when an earlier line has math対応中かも @orinnz が 43 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
vercel/streamdown#652 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
vercel/streamdown#731 ·
メンテナーはふだん 1 日以内に返信
-
Mermaid shows no error when a previously valid chart becomes invalid対応中かも @biggdawg320 が 5 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
vercel/streamdown#724 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
vercel/streamdown#719 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
vercel/streamdown#699 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
vercel/streamdown の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
open-webui/tether#52 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/void#835 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AykutSarac/jsoncrack.com#616 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melgarafael/DeskcommCRM#4679 ·
メンテナーはふだん 1 日以内に返信