[ANN] vfmd

Michel Fortin michel.fortin at michelf.ca
Mon Sep 30 09:44:45 EDT 2013


Le 30-sept.-2013 à 9:16, Roopesh Chander <roop at forwardbias.in> a écrit :


>> It's true that you can't solve the issue of editors having different lengths for tabs, but you're already picking four-space-per-tab so why do it differently from everyone else?

>

> What is everybody else doing? Do you mean that everyone else is expanding

> tabs while parsing using the "4-(column_number modulo 4)" method?


Well, pretty much everyone. With the number of implementations there are always going to be a few outliers. See for yourself:

http://johnmacfarlane.net/babelmark2/?normalize=1&text=%09%09a%0A%09.%09a%0A%09..%09a%0A%09...%09a%0A%09....%09a

I don't know about MultiMarkdown (it's not on Babelmark 2), but I assume it does the same as the majority.


> So, as far as I can see, these are the options:

> 1. Make it explicit in the syntax guide that tabs are not recommended.

> Suggest using expandtab or such stuff.

> 2. Assume tabstop as 4 and expand the tabs when parsing using the

> "4-(column_number

> modulo 4)" method (atleast it would work for tab-users who have tabstop as

> 4, unlike the current always-4-expansion)

> 3. Do both the above

>

> (Now that I think about it, I'm tending towards option #3, but I'll wait

> for your opinions.)


I'd go with #3, but instead of just of saying "tabs are not recommended" I'd explain and warn that Markdown assumes tab stops to be aligned to four spaces and that you might get unexpected results if your editors shows tab otherwise; spaces are more predictable. But that's more for user documentation than for the parsing specification.


--
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca



More information about the Markdown-Discuss mailing list