From 2aab93edb4513ad34d4ee59224fed6ad49de1370 Mon Sep 17 00:00:00 2001 From: yuin Date: Fri, 20 Dec 2019 11:12:24 +0900 Subject: [PATCH] Fixes tests --- extension/_test/table.txt | 1 + util/util.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/extension/_test/table.txt b/extension/_test/table.txt index 002008e..45c5998 100644 --- a/extension/_test/table.txt +++ b/extension/_test/table.txt @@ -210,4 +210,5 @@ Foo|Bar Dyne + //= = = = = = = = = = = = = = = = = = = = = = = =// diff --git a/util/util.go b/util/util.go index dd3a7a0..c64a291 100644 --- a/util/util.go +++ b/util/util.go @@ -262,6 +262,7 @@ func FindClosure(bs []byte, opener, closure byte, codeSpan, allowNesting bool) i if bs[i] == '`' { codeSpanCloser++ } else { + i-- break } } @@ -276,6 +277,7 @@ func FindClosure(bs []byte, opener, closure byte, codeSpan, allowNesting bool) i if bs[i] == '`' { codeSpanOpener++ } else { + i-- break } }