I have the following code in my editor:
@page "/editor"
@using Markdig;
<div class="row">
<div class="col-6">
<textarea class="form-control" @bind-value="Body" @bind-value:event="oninput"></textarea>
</div>
<div class="col-6">
@if (!string.IsNullOrWhiteSpace(Body))
{
@((MarkupString)Preview)
}
</div>
</div>
@code {
public string Body { get; set; }
public string Preview => Markdown.ToHtml(Body);
}
It works really well with everything except tables. I have tried both pipe and grid tables that should be supported but I can't get them to render. What am I doing wrong?
https://github.com/xoofx/markdig
https://github.com/xoofx/markdig/blob/master/src/Markdig.Tests/Specs/PipeTableSpecs.md
https://github.com/xoofx/markdig/blob/master/src/Markdig.Tests/Specs/GridTableSpecs.md
Markdown:
# Header
Text
- List item 1
- List item 2
+---------+---------+
| This is | a table |
a | b
-- | -
0 | 1
Pipe table works here on SO:
| a | b |
|---|---|
| 0 | 1 |
