[PR #885] [MERGED] Add support for a table without an extra new line before it #1277

Open
opened 2026-01-29 14:52:29 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/885
Author: @dannyp32
Created: 8/9/2025
Status: Merged
Merged: 8/28/2025
Merged by: @xoofx

Base: masterHead: supportTableWithoutExtraLine


📝 Commits (1)

  • d548b82 Add support for a table without an extra new line before it

📊 Changes

2 files changed (+5 additions, -3 deletions)

View changed files

📝 src/Markdig.Tests/TestPipeTable.cs (+2 -0)
📝 src/Markdig/Extensions/Tables/PipeTableParser.cs (+3 -3)

📄 Description

Fixes the following issue where a table will not be rendered if there isn't an extra line before the table.
https://github.com/xoofx/markdig/issues/818

For example this will not render correctly

Here is the table:
| Key   | Value    |
| ----  | -------- |
| Color | Blue     |
| Size  | Medium   |

But this will because there's an extra new line before the table starts

Here is the table:

| Key   | Value    |
| ----  | -------- |
| Color | Blue     |
| Size  | Medium   |

Not handled in this change - whitespace between the new line and the pipe


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/xoofx/markdig/pull/885 **Author:** [@dannyp32](https://github.com/dannyp32) **Created:** 8/9/2025 **Status:** ✅ Merged **Merged:** 8/28/2025 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `supportTableWithoutExtraLine` --- ### 📝 Commits (1) - [`d548b82`](https://github.com/xoofx/markdig/commit/d548b82bcd269c34221d06a007b06f3ea33ed236) Add support for a table without an extra new line before it ### 📊 Changes **2 files changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig.Tests/TestPipeTable.cs` (+2 -0) 📝 `src/Markdig/Extensions/Tables/PipeTableParser.cs` (+3 -3) </details> ### 📄 Description Fixes the following issue where a table will not be rendered if there isn't an extra line before the table. https://github.com/xoofx/markdig/issues/818 For example this will not render correctly ``` Here is the table: | Key | Value | | ---- | -------- | | Color | Blue | | Size | Medium | ``` But this will because there's an extra new line before the table starts ``` Here is the table: | Key | Value | | ---- | -------- | | Color | Blue | | Size | Medium | ``` Not handled in this change - whitespace between the new line and the pipe --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 14:52:29 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1277