diff --git a/inline.go b/inline.go index 0e41a3c..27bcc80 100644 --- a/inline.go +++ b/inline.go @@ -240,6 +240,8 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { i++ } + brace := 0 + // look for the matching closing bracket for level := 1; level > 0 && i < len(data); i++ { switch { diff --git a/inline_test.go b/inline_test.go index 6227914..b608a0a 100644 --- a/inline_test.go +++ b/inline_test.go @@ -544,7 +544,7 @@ func TestInlineLink(t *testing.T) { // Issue 116 in blackfriday "![](http://www.broadgate.co.uk/Content/Upload/DetailImages/Cyclus700(1).jpg)", - "

\"\"\n

\n", + "

\"\"

\n", // no closing ), autolinking detects the url next "[disambiguation](http://en.wikipedia.org/wiki/Disambiguation_(disambiguation) is the",