mdiep / MMMarkdown

An Objective-C framework for converting Markdown to HTML.
MIT License
1.25k stars 168 forks source link

If hash at the beginning of text, MMMarkdown thinks it is a header #96

Closed nnhubbard closed 8 years ago

nnhubbard commented 8 years ago

If you have text like the following:

300 is my best one yet!

MMMarkdown will turn that into a header, likely an H1. Obviously this shouldn't be, since there is no closing hash (#) to indicate it should be a header.

mdiep commented 8 years ago

Markdown doesn't require a closing hash. http://johnmacfarlane.net/babelmark2/?normalize=1&text=%23300+is+my+best+one+yet!

nnhubbard commented 8 years ago

According to the Markdown documentation there should be a space character after the #. (https://daringfireball.net/projects/markdown/syntax#header)

Github doesn't render a header unless you use a space.

General users would have no idea that they need to escape a hash, so following the documentation and requiring a space is a good idea. Especially with social media using hashtags requiring that space should be essential.

mdiep commented 8 years ago

According to the Markdown documentation there should be a space character after the #.

The Markdown "spec" doesn't say that. Its examples just happen to have space characters.

Github doesn't render a header unless you use a space.

That's a better argument. :relaxed:

I'll reopen this since CommonMark requires a space.