Merge pull request #32 from bertzzie/master Enable Parsing Inside a Link
Lancee LY.lancee@gmail.com
Sun, 08 Sep 2013 23:16:18 -0700
2 files changed,
5 insertions(+),
2 deletions(-)
M
inline.go
→
inline.go
@@ -180,8 +180,8 @@ )
// '[': parse a link or an image or a footnote func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { - // no links allowed inside other links - if p.insideLink { + // no links allowed inside regular links, footnote, and deferred footnotes + if p.insideLink && (data[offset-1] == '[' || data[offset+1] == '^') { return 0 }
M
inline_test.go
→
inline_test.go
@@ -390,6 +390,9 @@
"[link]( with whitespace )\n", "<p><a href=\"with whitespace\">link</a></p>\n", + "[![image](someimage)](with image)\n", + "<p><a href=\"with image\"><img src=\"someimage\" alt=\"image\" />\n</a></p>\n", + "[link](url \"one quote)\n", "<p><a href=\"url "one quote\">link</a></p>\n",