fletcher / MultiMarkdown-4

This project is now deprecated. Please use MultiMarkdown-6 instead!
https://github.com/fletcher/MultiMarkdown-5
Other
307 stars 59 forks source link

Reference labels should be case-insensitive #124

Closed jrblevin closed 9 years ago

jrblevin commented 9 years ago

The Markdown Syntax Documentation states that reference labels are case-insensitive, but they are currently case-sensitive in some cases in MultiMarkdown 4.

Link definition names may consist of letters, numbers, spaces, and punctuation — but they are not case sensitive. E.g. these two links:

[link text][a]
[link text][A]

are equivalent.

With MultiMarkdown 4, the above example is fine but the following is not (perhaps it's related to the spaces?):

[link text][a test]                                                                                    
[link text][A test]                                                                                    

[a test]: http://daringfireball.net

compiles to

<p><a href="http://daringfireball.net">link text</a>
[link text][A test]</p>

Incidentally, peg-markdown handles this correctly (see find_references and match_inlines in utility_functions.c). I skimmed the MultiMarkdown code but couldn't quite figure out where to look. I'll try again when I have more time, but perhaps it's obvious to you.

fletcher commented 9 years ago

Thanks!