Skip to content

Commit

Permalink
Fix emphasis parsing with table delimiters (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Mar 27, 2022
1 parent 6a35ec4 commit 8beb096
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Markdig.Tests/TestPlayParser.cs
Expand Up @@ -12,6 +12,12 @@ namespace Markdig.Tests
[TestFixture]
public class TestPlayParser
{
[Test]
public void TestBugWithEmphasisAndTable()
{
TestParser.TestSpec("**basics | 8:00**", "<p><strong>basics | 8:00</strong></p>", "advanced");
}

[Test]
public void TestLinksWithCarriageReturn()
{
Expand Down
3 changes: 2 additions & 1 deletion src/Markdig/Parsers/Inlines/EmphasisInlineParser.cs
Expand Up @@ -125,7 +125,8 @@ public bool PostProcess(InlineProcessor state, Inline? root, Inline? lastChild,
continue;
}

child = child.NextSibling;
// Follow DelimiterInline (EmphasisDelimiter, TableDelimiter...)
child = child is DelimiterInline delimiterInline ? delimiterInline.FirstChild : child.NextSibling;
}

if (delimiters != null)
Expand Down

0 comments on commit 8beb096

Please sign in to comment.