From 0baaa1080a5e937bf8b3c301fbe5db08145b58b4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 27 Jul 2015 10:24:06 -0700 Subject: Pipe tables: allow indented columns. Previously the left-hand column could not start with 4 or more spaces indent. This was inconvenient for right-aligned left columns. Note that the first (header column) must still have 3 or fewer spaces indentation, or the table will be treated as an indented code block. --- tests/pipe-tables.native | 10 +++++++++- tests/pipe-tables.txt | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/pipe-tables.native b/tests/pipe-tables.native index eafd21d22..9d499c9c2 100644 --- a/tests/pipe-tables.native +++ b/tests/pipe-tables.native @@ -75,4 +75,12 @@ ,Para [Str "Header-less",Space,Str "one-column:"] ,Table [] [AlignCenter] [0.0] [[]] - [[[Plain [Str "hi"]]]]] + [[[Plain [Str "hi"]]]] +,Para [Str "Indented",Space,Str "left",Space,Str "column:"] +,Table [] [AlignRight,AlignLeft] [0.0,0.0] + [[Plain [Str "Number",Space,Str "of",Space,Str "siblings"]] + ,[Plain [Str "Salary"]]] + [[[Plain [Str "3"]] + ,[Plain [Str "33"]]] + ,[[Plain [Str "4"]] + ,[Plain [Str "44"]]]]] diff --git a/tests/pipe-tables.txt b/tests/pipe-tables.txt index 83debd595..a8803724a 100644 --- a/tests/pipe-tables.txt +++ b/tests/pipe-tables.txt @@ -52,3 +52,10 @@ Header-less one-column: | | |:-:| |hi| + +Indented left column: + +Number of siblings | Salary +------------------:|:------ + 3 | 33 + 4 | 44 -- cgit v1.2.3