fletcher / MultiMarkdown-4

This project is now deprecated. Please use MultiMarkdown-6 instead!
https://github.com/fletcher/MultiMarkdown-5
Other
307 stars 59 forks source link

Add alternate markup for new table section. #43

Closed jmatsushita closed 10 years ago

jmatsushita commented 10 years ago

Currently the doc states:


You can create multiple <tbody> tags within a table by having a single empty
line between rows of the table. This allows your CSS to place horizontal borders to
emphasize different sections of the table.

However using tools such as Table Editor (https://github.com/vkocubinsky/SublimeTableEditor) the addition of a section through an empty line, looses the context that allows to maintain the different sections of the table together.

Maybe allowing an alternate "New Section" markup would make it easier to keep tables visually connected when they're in the same section while allowing to visually separate them neatly with visual aids that Table Editor provides?

Here's my proposition:


| A   | B   |
| --- | --- |
| C   | D   |

| E   | F   |

Currently this renders with a tbody around the E / F row as expected.


| A   | B   |
| --- | --- |
| C   | D   |
|
| E   | F   |

This currently breaks the table, however it could allow to quickly (only one more keypress) obtain the same effect as above while adding a visual connection to the different sections of the table.


| A   | B   |
| --- | --- |
| C   | D   |
|     |     |
| E   | F   | 

This currently renders the empty cell row as empty tds. If empty rows marked new sections, it would allow the visual candy of seeing pipes neatly aligned while using tools like Table Editor. For instance the sample table markup would look like this after a few reformatting tab presses (see improvement request):


|              | Grouping                    ||
| First Header | Second Header | Third Header |
| ------------ | :-----------: | -----------: |
| Content      |         *Long Cell*         ||
| Content      |    **Cell**   |         Cell |
|
| New section  |      More     |         Data |
| And more     |           And more          ||
[Prototype table]

Or this


|              | Grouping                    ||
| First Header | Second Header | Third Header |
| ------------ | :-----------: | -----------: |
| Content      |         *Long Cell*         ||
| Content      |    **Cell**   |         Cell |
|              |               |              |
| New section  |      More     |         Data |
| And more     |           And more          ||
[Prototype table]

Which feels to me more readable than the single empty line. But I'm aware of how subjective this is...

fletcher commented 10 years ago

Wait.

You're requesting that I change the syntax because someone created a table tool that doesn't work properly?

The correct solution is to fix the tool, not rewrite the syntax.