vkocubinsky / SublimeTableEditor

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

Compound Textile table cell specifiers #24

Closed idpaterson closed 11 years ago

idpaterson commented 11 years ago

Adds support for multiple specifiers within a single cell, for example right alignment within a header cell with |_>. or |>_. Updated tests include some very contrived cases of compound cell modifiers.

I was very glad to see that you are working on colspans and rowspans! This plugin will be very useful in the near future for updating our wiki with a few complex tables that would otherwise be unmanageable. I am glad to contribute a bit of free time to make that possible.

vkocubinsky commented 11 years ago

Thanks for the patch, I will look close on it when finish colspan feature for textile syntax.

Colspan is close to finish(it works in tablelib.py) with some restriction:

I am going to investigate into Rowspan feature in near future, but for now it doesn't work.

Branch "dev" is a branch where I developing new features or save my work, you were right when make patch for this branch. But some time you can see that "Table Editor" plugin doesn't work from "dev".

I use http://redcloth.org/hobix.com/textile/#tables for see on the textile syntax. Do you know some other web resources where I can look on syntax for Compound Textile table cell specifiers?

Thanks!

idpaterson commented 11 years ago

I have not seen any references specifying how those specifiers can be mixed, I think that generally anything is supported as long as you do not use two mutually exclusive specifiers. That is to say, you could combine right alignment with colspan, but you could not combine right alignment with left alignment because it doesn't make sense. The Textile 2.0 documentation you are using simply says "Other attributes can be applied as well"

My approach with the regex was not necessarily to validate user input; it would allow an invalid specifier with both center and left alignment =<. I don't think that is a big concern for the sake of your plugin as long as the plugin doesn't break in cases like that.

There are a lot of different references out there for Textile 2.0, 2.2, and 2.4. As far as I have seen there are no backwards compatibility issues with 2.4, just additional features. I used this reference and sandbox since it targets 2.4 and allows seeing the results in HTML. There is a lot of oddball syntax added in 2.4 obviously outside of the scope of colspans and rowspans, but it shows a few good examples.

vkocubinsky commented 11 years ago

Thanks, it is a good link