all repos — grayfriday @ 472fe3a75661156c826b7b148cd4c0c0e28f84a9

blackfriday fork with a few changes

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
commit

472fe3a75661156c826b7b148cd4c0c0e28f84a9

parent

3f24fadb287eb593a53a00570cd8092b6e572244

2 files changed, 5 insertions(+), 2 deletions(-)

jump to
M inline.goinline.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.goinline_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 &quot;one quote\">link</a></p>\n",