mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-14 13:54:55 +00:00
[PR #863] [MERGED] Infer pipe table column widths from separator row #1257
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/xoofx/markdig/pull/863
Author: @Amberg
Created: 4/9/2025
Status: ✅ Merged
Merged: 4/15/2025
Merged by: @xoofx
Base:
master← Head:master📝 Commits (1)
55f770cfeat: infer pipe table column widths from separator row📊 Changes
5 files changed (+88 additions, -19 deletions)
View changed files
📝
src/Markdig.Tests/TestPipeTable.cs(+38 -1)📝
src/Markdig/Extensions/Tables/GridTableParser.cs(+1 -1)📝
src/Markdig/Extensions/Tables/PipeTableOptions.cs(+7 -0)📝
src/Markdig/Extensions/Tables/PipeTableParser.cs(+34 -11)📝
src/Markdig/Extensions/Tables/TableHelper.cs(+8 -6)📄 Description
Hi
First off, thank you for your great library — I use it to convert Markdown to Open XML in my DocxTemplater, and it’s been working beautifully.
In my use case, I needed a way to control column widths in pipe tables. Unfortunately, the grid table syntax wasn't an option because it requires monospaced fonts.
This PR introduces a small but useful enhancement:
What’s included
PipeTableOptions.InferColumnWidthsFromSeparator.This allows authors to write tables like:
…to get column widths of 25%, 50%, 25%, depending on the relative dash count.
Let me know if you'd like changes or further refinements — happy to adjust!
Thanks again for your work!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.