~sircmpwn/scdoc

71a57942af1610d801c873e829de01dc3eff12f2 — Drew DeVault 11 months ago 309ff46
Allow continuation of table cells on the next line
2 files changed, 10 insertions(+), 4 deletions(-)

M scdoc.5.scd
M src/main.c
M scdoc.5.scd => scdoc.5.scd +7 -4
@@ 118,10 118,11 @@ of dashes (-), like so:
To begin a table, add an empty line followed by any number of rows.

Each line of a table should start with | or : to start a new row or column
respectively, followed by [ or - or ] to align the contents to the left, center,
or right, followed by a space and the contents of that cell.  You may use a
space instead of an alignment specifier to inherit the alignment of the same
column in the previous row.
respectively (or space to continue the previous cell on multiple lines),
followed by [ or - or ] to align the contents to the left, center, or right,
followed by a space and the contents of that cell.  You may use a space instead
of an alignment specifier to inherit the alignment of the same column in the
previous row.

The first character of the first row is not limited to | and has special
meaning. [ will produce a table with borders around each cell. | will produce a


@@ 140,6 141,7 @@ To conclude your table, add an empty line after the last row.
|  *Row 2*
:  こんにちは
:  世界
   !
```

[[ *Foo*


@@ 151,6 153,7 @@ To conclude your table, add an empty line after the last row.
|  *Row 2*
:  こんにちは
:  世界
   !

## LITERAL TEXT


M src/main.c => src/main.c +3 -0
@@ 481,6 481,8 @@ static void parse_table(struct parser *p, uint32_t style) {
				++column;
			}
			break;
		case ' ':
			goto continue_cell;
		default:
			parser_fatal(p, "Expected either '|' or ':'");
			break;


@@ 516,6 518,7 @@ static void parse_table(struct parser *p, uint32_t style) {
			break;
		}
		curcell->contents = str_create();
continue_cell:
		switch (ch = parser_getch(p)) {
		case ' ':
			// Read out remainder of the text