vkocubinsky/SublimeTableEditor

Textile rowspan formatting improvement

Opened this issue · 1 comments

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!

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.