Feature: reformat Markdown tables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UberWriter (moved to github!) |
In Progress
|
Wishlist
|
Unassigned |
Bug Description
The markdown syntax for tables is really simply. Drawing this tables with a normal editor like Uberwriter is painful. So it would be very helpfull to have command to reformat an new/changed table.
For *grid tables*, the reformatting could look like this.
Before:
+--+--+--+
|head left | head centered | head right|
+==+==+==+
|lolng entry | line 1 | line 1|
+--+--+--+
|line 2 | line 2 | line 2 |
+--+--+--+
After reformatting:
+------
|head left | head centered | Kopf rechts|
+======
|longer entry | line 1 | line 1|
+------
|line 2 | line 2 | line 2|
+------
As you can see, the alignment is defined by the header. Each column is aligned as expected. The width of the columns is detemined automatically.
Other feature could be the creation of a new table based on the current line (or selection). If the current line is the header of an table, the *create* functions expand this into an full mardown table.
|head left | head centered | head right|
will be expanded to
+------
|head left | head centered | head right|
+------
| | | |
+======
In my personal opinion, the *simple table* syntax is much more handy but harder to parse. IMO reformatting is possible with both of these table declarations. ;-)
Hi Joede,
in the development version of uberwriter is already such a feature.
However, in the RST-markup you're using, there is no possibility of having a right or center aligned cell... It's a limitation by pandoc as far as I know.
The last bug in the dev version is that it can't handle multiline cells and a lot of other things, eg cells that span multiple rows or columns.
As you can guess, there is quite a number of "cases" to handle :(