Tables
John Gruber
gruber at fedora.net
Tue Nov 15 11:24:59 EST 2005
Michel Fortin <michel.fortin at michelf.com> wrote on 11/14/05 at 6:52 PM:
> My way to think about it is that by relying on spacing for alignement
> you increase the risk of unexpected results. It's a nice idea, but we
> must be careful with it. For example, this overspaced table could be
> a problem:
>
> | First | Second |
> | ---------- | ----------- |
> | 1.0 | 1.2 |
> | 23.2 | 24.1 |
>
> I'm not sure you could find a *reliable* algorithm to find the
> expected alignement here (assuming it could have been written in a
> variable-width font) because you can't just count the spaces on the
> left and on the right and say we should align cells on the side where
> there is more space.
I'm thinking that rather than counting any arbitrary number of
spaces, and looking for one side of a column that uses the same
number of spaces for each cell, that the rule would be that you'd
have to use 0 or 1 spaces on the right side if you want
right-alignment.
-J.G.
More information about the Markdown-Discuss
mailing list