Add support for a table without an extra new line before it - #885
Conversation
|
@xoofx hoping you can take a look. Open to any suggestions |
|
Thanks for this. I will have to double check some stuffs but it could be enough. |
|
Possibly an issue with how we're dealing with new lines in this change. |
|
Looks like this change is also removing the content before the table string md =
"""
Some text
| A |
|---|
| B |
""".ReplaceLineEndings("\n");
var pipeline = new MarkdownPipelineBuilder()
.UsePipeTables()
.Build();
Console.WriteLine(Markdown.ToHtml(md, pipeline));(note the missing "some text") <table>
<thead>
<tr>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>B</td>
</tr>
</tbody>
</table>And it doesn't match the table if the text before it is more than one line (not sure if this was intentional). |
|
FWIW - I normalize my linefeeds to LF before sending to Markdig, so that's not the issue I'm seeing... |
|
I suspect that your case hit this
Should be fixed with #905 to allow multiple lines of text to precede the table. |

Fixes the following issue where a table will not be rendered if there isn't an extra line before the table.
#818
For example this will not render correctly
But this will because there's an extra new line before the table starts
Not handled in this change - whitespace between the new line and the pipe