diff --git a/src/Markdig.Tests/TestPlayParser.cs b/src/Markdig.Tests/TestPlayParser.cs
index ac9d533a..095f3d63 100644
--- a/src/Markdig.Tests/TestPlayParser.cs
+++ b/src/Markdig.Tests/TestPlayParser.cs
@@ -157,6 +157,40 @@ Paragraph
", "advanced");
}
+ [Test]
+ public void TestGridTableWithCustomAttributes() {
+
+ var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
+
+ var input = @"
+{.table}
++---+---+
+| a | b |
++===+===+
+| 1 | 2 |
++---+---+
+";
+
+ var expected = @"
+
+
+
+
+| a |
+b |
+
+
+
+
+| 1 |
+2 |
+
+
+
+";
+ var result = Markdown.ToHtml(input, pipeline);
+ Assert.AreEqual(result, expected);
+ }
[Test]
public void TestSamePipelineAllExtensions()
diff --git a/src/Markdig/Extensions/GenericAttributes/GenericAttributesParser.cs b/src/Markdig/Extensions/GenericAttributes/GenericAttributesParser.cs
index c612ec8d..0fa4bf20 100644
--- a/src/Markdig/Extensions/GenericAttributes/GenericAttributesParser.cs
+++ b/src/Markdig/Extensions/GenericAttributes/GenericAttributesParser.cs
@@ -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;
}
}