vkocubinsky / SublimeTableEditor

This package is no more supported. I moved to vim.
Other
494 stars 67 forks source link

Textile rowspan formatting improvement #27

Open idpaterson opened 11 years ago

idpaterson commented 11 years ago

Currently, a rowspan entered like this

|/2. A | B |

is formatted like this

|/2. A | B |
|      |

That representation is not quite accurate since the syntax means that the A column extends two rows. A more semantic presentation of a rowspan would be something like this where the second row is aligned under the B column.

|/2. A | B |
       |   |

In other cases where the rowspan is between two columns it is less clear what is the right thing to do. Currently a three-column table with a rowspan on the second column is formatted like this

| A |/2. B | C |
|   |      |

There is no great way to represent that in Textile, but this could work

| A |/2. B | C |
|          |   |

Here we align the columns on their left edges, so A is as wide as it needs to be to allow C to be aligned. Not sure if some of the colspan logic can come into play here for the sake of rendering but it looks possible.

This is not a severe issue since either way Textile still generates the correct table. Just a question of whether it is possible to keep the other columns aligned. Great work so far, this plugin is extremely helpful!

vkocubinsky commented 11 years ago

Thanks for analysis, I like proposed rowspan rendering.

I will release version 1.4 with current rowspan implementation and I will try to implement this proposal in next releases.