FSX / misaka

A Python binding for Hoedown.
http://misaka.61924.nl
MIT License
418 stars 65 forks source link

Misaka handles single-brackets fine; but double-brackets don't work. #35

Closed jvanasco closed 7 years ago

jvanasco commented 11 years ago

I'm not sure if this is a bug or not. My usage isn't within the spec of Markdown , but there is an inconsistency...

The AUTOLINK extension works fine with 1 bracket, but with 2 brackets it has an issue.

def test_autolink_bracket_single(self):
    markdown = self.render_with('[http://axr.vg]', extensions=EXT_AUTOLINK)
    ok(markdown).diff('<p>[<a href=\"http://axr.vg">http://axr.vg</a>]</p>\n')

def test_autolink_bracket_double(self):
    markdown = self.render_with('[[http://axr.vg]]', extensions=EXT_AUTOLINK)
    ok(markdown).diff('<p>[[<a href=\"http://axr.vg">http://axr.vg</a>]]</p>\n')

on the 2 bracket version, it renders...

 +<p>[[<a href="http://axr.vg%5D">http://axr.vg]</a>]</p>

I can understand why it would perhaps do... %5D%5D

 +<p>[[<a href="http://axr.vg%5D%5D">http://axr.vg]]</a></p>

but the current implementation is a bit odd.

while I'd love for it to ignore the double brackets, i'm an edge case and can code around that. i just wanted to note this.

FSX commented 11 years ago

Noted. Will reply later. Studying for exams.

FSX commented 7 years ago

This looks like a Hoedown issue. :(