bhollis / maruku

A pure-Ruby Markdown-superset interpreter (Official Repo).
MIT License
502 stars 80 forks source link

Bug in Maruku related to utf8 in a-tag titles #27

Closed rriemann closed 13 years ago

rriemann commented 13 years ago

Until today I used maruku with my jekyll powered blog. I swiched now to kramdown, because there seems to be a bug in maruku. As with kramdown everything works, the bug might be related not to jekyll itselft, but to maruku.

Take the following markdown code:

[![Alone Again (Naturally) ♬][img]{:.webcomic style="max-width:400px;"}][img]

[Video by Gilbert O'Sullivan][video]<br/>
[SVG Source][src]<br/>
[![Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic][cc_pic]][cc]

[video]: http://www.youtube.com/watch?v=D_P-v1BVQn8&t=1m53s "Alone Again (Naturally) by Gilbert O'Sullivan"
[img]:  {{ site.url }}/images/webcomic/alone_again.png "Alone Again (Naturally) ♬"
[src]:  {{ site.url }}/images/webcomic/alone_again.svg "SVG from Inkscape"
[cc_pic]: {{ site.url }}/images/by-nc-sa.eu.png "Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic"
[cc]: http://creativecommons.org/licenses/by-nc-sa/2.0/ "Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Gene

The code above generates a correct img alt attribute, but the title attribute of the a-tag is wrong: "[Alone Again (Naturally"

Kind regards and thanks for providing such a great gem, Robert

distler commented 13 years ago

It's not the utf-8 character that is throwing Maruku off. It's the ")".

This is fixed on my Nokogiri branch.

rriemann commented 13 years ago

Thank you. :)