From 785b85a76a2cfabe3d94a2ed7ebbf65a6865eb77 Mon Sep 17 00:00:00 2001 From: yuin Date: Wed, 25 Mar 2020 15:39:51 +0900 Subject: [PATCH] Fixes #115 --- extension/_test/table.txt | 23 +++++++++++++++++++++++ util/util.go | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/extension/_test/table.txt b/extension/_test/table.txt index 45c5998..946d38a 100644 --- a/extension/_test/table.txt +++ b/extension/_test/table.txt @@ -212,3 +212,26 @@ Foo|Bar //= = = = = = = = = = = = = = = = = = = = = = = =// + + +10 +//- - - - - - - - -// +foo|bar +---|--- +`\` | second column +//- - - - - - - - -// + + + + + + + + + + + + + +
foobar
\second column
+//= = = = = = = = = = = = = = = = = = = = = = = =// diff --git a/util/util.go b/util/util.go index b6896ad..ef113c4 100644 --- a/util/util.go +++ b/util/util.go @@ -268,7 +268,7 @@ func FindClosure(bs []byte, opener, closure byte, codeSpan, allowNesting bool) i if codeSpanCloser == codeSpanOpener { codeSpanOpener = 0 } - } else if c == '\\' && i < len(bs)-1 && IsPunct(bs[i+1]) { + } else if codeSpanOpener == 0 && c == '\\' && i < len(bs)-1 && IsPunct(bs[i+1]) { i += 2 continue } else if codeSpan && codeSpanOpener == 0 && c == '`' {