Merge branch 'pr/n121_pearsonn'

This commit is contained in:
Alexandre Mutel
2017-06-18 10:50:39 +02:00
2 changed files with 35 additions and 1 deletions

View File

@@ -157,6 +157,40 @@ Paragraph
</table>", "advanced");
}
[Test]
public void TestGridTableWithCustomAttributes() {
var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
var input = @"
{.table}
+---+---+
| a | b |
+===+===+
| 1 | 2 |
+---+---+
";
var expected = @"<table class=""table"">
<col style=""width:50%"">
<col style=""width:50%"">
<thead>
<tr>
<th>a</th>
<th>b</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>
";
var result = Markdown.ToHtml(input, pipeline);
Assert.AreEqual(result, expected);
}
[Test]
public void TestSamePipelineAllExtensions()

View File

@@ -59,7 +59,7 @@ namespace Markdig.Extensions.GenericAttributes
{
objectToAttach = parent[indexOfParagraph + 1];
// We can remove the paragraph as it is empty
parent.RemoveAt(indexOfParagraph);
paragraph.RemoveAfterProcessInlines = true;
}
}