xoofx / xoofx/markdig

PipeTable invalid rendering

Open
#744 13 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement PR Welcome!
Dominant language
C#
Stars
5.3k
Forks
510
Avg merge
8d 5h
Merged PRs (30d)
5

Description

Hi,

Given table is rendered as below.

var content = File.ReadAllText("source.md");

var pipeline = new MarkdownPipelineBuilder()
    .UseAdvancedExtensions()
    .UseGridTables()
    .UsePipeTables()
    .EnableTrackTrivia()
    .Build();

var document = Markdown.Parse(content, pipeline);

using var sw = new StringWriter();
var renderer = new RoundtripRenderer(sw);
var output = renderer.Render(document).ToString();

File.WriteAllText("modified.md", output);

| Column 1 | Column 2 |
|----------|----------|
| Test     | Test 2   |
| Test     | Test 2   |
Column 1Column 2TestTest 2TestTest 2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied C# reproduction, focusing on the Markdown.Parse pipeline with UsePipeTables and the RoundtripRenderer. Compare the rendered output with the input table and trace how the parsed pipe-table structure is handled; done means the round-trip output preserves the table rows and columns.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, markdown
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.