mixu / markdown-styles

Markdown to static HTML generator and multiple CSS themes for Markdown
1.85k stars 250 forks source link

Incorrect Parsing of SML Code #10

Closed edalorzo closed 9 years ago

edalorzo commented 10 years ago

I was writing an article yesterday in markdown and then I tried to convert it to an html page using your tool and I found a bug.

The following is a piece of code I wrote:

fun get_all_even_snd xs = filter((fn (_,v) => v mod 2 = 0), xs)

This is incorrectly parsed as:

fun getall_even_snd xs = filter((fn (,v) => v mod 2 = 0), xs)

You can see that the _ (underscore) character was misinterpreted.

mixu commented 9 years ago

Thanks for filing this issue! This is now fixed; I remember specifically addressing it in the 2.0 update. Testing with v2.3.0 produces the expected output:

fun get_all_even_snd xs = filter((fn (_,v) => v mod 2 = 0), xs)