From 7fbe473b2e3b3b2b94be810b6385475c056a304a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 21 Apr 2018 13:06:57 -0700 Subject: Markdown reader/writer: spacing adjustments in tables. * Markdown writer now includes a blank line at the end of the row in a single-row multiline table, to prevent it from being interpreted as a simple table. Closes #4578. * Markdown reader does a better job computing the relative width of the last column in a multiline table, so we can round-trip tables without constantly shrinking the last column. --- test/tables.haddock | 60 ++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'test/tables.haddock') diff --git a/test/tables.haddock b/test/tables.haddock index 678c5c15a..dcfc0f7ad 100644 --- a/test/tables.haddock +++ b/test/tables.haddock @@ -40,33 +40,33 @@ Simple table indented two spaces: Multiline table with caption: -> +----------+---------+-----------+-------------------------+ -> | Centered | Left | Right | Default aligned | -> | Header | Aligned | Aligned | | -> +==========+=========+===========+=========================+ -> | First | row | 12.0 | Example of a row that | -> | | | | spans multiple lines. | -> +----------+---------+-----------+-------------------------+ -> | Second | row | 5.0 | Here’s another one. | -> | | | | Note the blank line | -> | | | | between rows. | -> +----------+---------+-----------+-------------------------+ +> +----------+---------+-----------+--------------------------+ +> | Centered | Left | Right | Default aligned | +> | Header | Aligned | Aligned | | +> +==========+=========+===========+==========================+ +> | First | row | 12.0 | Example of a row that | +> | | | | spans multiple lines. | +> +----------+---------+-----------+--------------------------+ +> | Second | row | 5.0 | Here’s another one. Note | +> | | | | the blank line between | +> | | | | rows. | +> +----------+---------+-----------+--------------------------+ > > Here’s the caption. It may span multiple lines. Multiline table without caption: -> +----------+---------+-----------+-------------------------+ -> | Centered | Left | Right | Default aligned | -> | Header | Aligned | Aligned | | -> +==========+=========+===========+=========================+ -> | First | row | 12.0 | Example of a row that | -> | | | | spans multiple lines. | -> +----------+---------+-----------+-------------------------+ -> | Second | row | 5.0 | Here’s another one. | -> | | | | Note the blank line | -> | | | | between rows. | -> +----------+---------+-----------+-------------------------+ +> +----------+---------+-----------+--------------------------+ +> | Centered | Left | Right | Default aligned | +> | Header | Aligned | Aligned | | +> +==========+=========+===========+==========================+ +> | First | row | 12.0 | Example of a row that | +> | | | | spans multiple lines. | +> +----------+---------+-----------+--------------------------+ +> | Second | row | 5.0 | Here’s another one. Note | +> | | | | the blank line between | +> | | | | rows. | +> +----------+---------+-----------+--------------------------+ Table without column headers: @@ -80,11 +80,11 @@ Table without column headers: Multiline table without column headers: -> +----------+---------+-----------+-------------------------+ -> | First | row | 12.0 | Example of a row that | -> | | | | spans multiple lines. | -> +----------+---------+-----------+-------------------------+ -> | Second | row | 5.0 | Here’s another one. | -> | | | | Note the blank line | -> | | | | between rows. | -> +----------+---------+-----------+-------------------------+ +> +----------+---------+-----------+--------------------------+ +> | First | row | 12.0 | Example of a row that | +> | | | | spans multiple lines. | +> +----------+---------+-----------+--------------------------+ +> | Second | row | 5.0 | Here’s another one. Note | +> | | | | the blank line between | +> | | | | rows. | +> +----------+---------+-----------+--------------------------+ -- cgit v1.2.3