PPTX chart labels with pipes or line breaks produce malformed Markdown tables
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 92/100
調査の方向性
提供されている PPTX チャートの再現処理を実行し、不正な Markdown テーブルを調査します。PPTX チャートテーブルのシリアライズパスで、パイプをすでにエスケープし、改行を圧縮している CSV 変換パスとセルの書式を比較します。完了とは、シリーズ名とカテゴリラベルが意図したセルに残り、パイプが \| としてエスケープされ、改行が圧縮され、生成された Markdown がテーブルとして描画されることを意味します。
索引モデルが issue の本文から書いたものです。
説明
What happened
When a PowerPoint chart has a pipe in a series name or a category label, the converter writes it as a Markdown column separator. A line break inside the label also splits the row. The resulting header can have a different number of cells from the delimiter row, so a Markdown renderer may show plain text instead of a table.
Reproduction
Install markitdown[pptx] and run this example.
from io import BytesIO
from markitdown import MarkItDown, StreamInfo
from pptx import Presentation
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE
from pptx.util import Inches
deck = Presentation()
slide = deck.slides.add_slide(deck.slide_layouts[6])
data = CategoryChartData()
data.categories = ["North | West\nRetail"]
data.add_series("Revenue | Forecast", [10])
slide.shapes.add_chart(XL_CHART_TYPE.COLUMN_CLUSTERED, 0, 0, Inches(6), Inches(4), data)
stream = BytesIO()
deck.save(stream)
stream.seek(0)
print(MarkItDown().convert_stream(stream, stream_info=StreamInfo(extension=".pptx")).markdown)
Actual chart table
| Category | Revenue | Forecast |
|---|---|
| North | West
Retail | 10.0 |
Expected chart table
| Category | Revenue \| Forecast |
|---|---|
| North \| West Retail | 10.0 |
CSV conversion already escapes pipes and collapses line breaks in Markdown table cells. Applying that same formatting to chart cells would keep labels and values in their intended columns.
Reproduced on main at ed178952a6672abdfd35b5f9e76a80b6cefc086e (MarkItDown 0.1.9), with Python 3.12.10 and python-pptx 1.0.2 on macOS.
OpenAI Codex assisted with reproducing and drafting this report.
- 主要言語
- Python
- スター
- 198k
- フォーク
- 15k
- 平均マージ
- 2時間 16分
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/markitdown のほかの issue
-
IpynbConverter uses a comment inside a Markdown code fence as the notebook title対応中かも @Primaverah が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
microsoft/markitdown#2964 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
PPTX image alt text ending in a backslash breaks the Markdown image対応中かも @dongyikuan919 が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/markitdown#2943 ·
メンテナーはふだん 1 日以内に返信
-
DOCX: math pre-processing re-parses every document.xml even without equations (32 s -> 17.5 s on a 12.5 MB document)対応中かも @houyunsun が 26 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 89/100
microsoft/markitdown#2834 ·
メンテナーはふだん 1 日以内に返信
-
URL fetch sends default python-requests User-Agent, Wikipedia returns 403対応中かも @sushan5140 が 31 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/markitdown#2820 ·
メンテナーはふだん 1 日以内に返信
-
Valid Atom feeds with zero entries are rejected as an unknown feed type対応中かも @Ayush701-code-zm が 24 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/markitdown#2781 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/markitdown の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
AIR-Bench Foundation reads the first letter of the word after "answer" as the model's choice対応中かも @beartester34 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
modelscope/evalscope#2330 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Distribution plot crashes when a numeric feature is constant in the train or test set対応中かも @adembilge が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 10 日以内に返信