Opinion — The Markdown syntax is sweet, but it also suffers major usability flaws. I’m seriously considering to take the Markdown fix plugin (obsolete) a few steps in a direction where it actually enhances Markdown. My two main concerns come from the fact that Markdown uses a ‘dumb’ syntax. ‘Dumb’, as in too rigidly consistent.
The first is a bug/feature that you bump into whenever a user inserts code in a comment. Invariably,
do_something_method() will format a dosomethingmethod() because the user did not insert backticks. To make things worse, users do not insert backticks even when explicitly invited to. And even if they did, it is a pathetic way to solve the problem. Markdown must change.
I’m thinking of fixing this by automatically translating
do\_something\_method() outside of code blocks. Obviously, it’s a bit more complex, because of things like
__foo(), but it might very well work out by trying to match symmetric patterns based on word boundaries, which arguably looks more like a user inserting an emphasis. The same goes, to a lesser extent, with
* (as in
The second common bug/feature that you bump into is related to the way Markdown processes line breaks. Some users insert paragraphs in their comments… using a single line break to insert a paragraph. Whereby Markdown will transform a perfectly formatted text into a horrendous single text block.
I think there is room for auto-correction here too. For instance, by adding line feeds and double spaces where they are obviously missing, outside of code blocks.
I’d be curious to know your thoughts on the two topics, if any.
Update: Michel Fortin released a Markdown Extra plugin, that does the above.