asciidoctor / asciidoctor

:gem: A fast, open source text processor and publishing toolchain, written in Ruby, for converting AsciiDoc content to HTML 5, DocBook 5, and other formats.
https://asciidoctor.org
Other
4.85k stars 790 forks source link

Allow implicit header row to define column formatting #889

Open mojavelinux opened 10 years ago

mojavelinux commented 10 years ago

AsciiDoc doesn't apply formatting on cells in the header row. This gives us an opportunity to reuse the cell specifier slot as column specifiers in an implicit header row (or perhaps the header row in general). This would eliminate the requirement to use block attributes to specify column formatting. We should parse the specifier information as a column specifier.

Instead of:

[cols="1m,2"]
|===
|Property Name |Description

|jruby.compat.version
|Ruby language compatibility

|jruby.compile.mode
|Toggles compilation
|===

we can instead write:

|===
1m|Property Name 2|Description

|jruby.compat.version
|Ruby language compability

|jruby.compile.mode
|Toggles compilation
|===
mojavelinux commented 8 years ago

My only concern is that it may cause confusion. Someone may not understand why the formatting is being applied to the cell in the header row itself (the answer is that formatting cannot be applied to cells in the header row).