From 8174177880cc0a2078b5327ec309b423bde9820b Mon Sep 17 00:00:00 2001 From: yuin Date: Sat, 11 Sep 2021 09:44:22 +0900 Subject: [PATCH] Fix #245 - 1 --- _test/extra.txt | 9 +++++++++ parser/delimiter.go | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/_test/extra.txt b/_test/extra.txt index d0b7555..f194d69 100644 --- a/_test/extra.txt +++ b/_test/extra.txt @@ -344,6 +344,7 @@ C //= = = = = = = = = = = = = = = = = = = = = = = =// + 22: Indented code block within list can start with tab //- - - - - - - - -// - List @@ -365,3 +366,11 @@ C

a

//= = = = = = = = = = = = = = = = = = = = = = = =// + +23: Emphasis corner case(yuin/goldmark#245) +//- - - - - - - - -// +a* b c d *e* +//- - - - - - - - -// +

a* b c d e

+//= = = = = = = = = = = = = = = = = = = = = = = =// + diff --git a/parser/delimiter.go b/parser/delimiter.go index 43e132e..74352d1 100644 --- a/parser/delimiter.go +++ b/parser/delimiter.go @@ -200,10 +200,11 @@ func ProcessDelimiters(bottom ast.Node, pc Context) { } } if !found { + next := closer.NextDelimiter if !maybeOpener && !closer.CanOpen { pc.RemoveDelimiter(closer) } - closer = closer.NextDelimiter + closer = next continue } opener.ConsumeCharacters(consume)