From dec888641006eb685a642ec489b198c61a5736dc Mon Sep 17 00:00:00 2001 From: Alina Banerjee Date: Thu, 1 Aug 2019 16:01:39 -0500 Subject: Update parsing to strip whitespace from table cells (#1074) * Update parsing to strip leading & trailing whitespace from table cells * Update fixture data to disallow whitespaces at both ends in table cells * Add test case for whitespaces stripped from both ends of table cells * Update table reference test data for html tests --- haddock-library/fixtures/examples/table5.parsed | 27 +++++++++---------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'haddock-library/fixtures/examples/table5.parsed') diff --git a/haddock-library/fixtures/examples/table5.parsed b/haddock-library/fixtures/examples/table5.parsed index 9a547ad3..f9a387bb 100644 --- a/haddock-library/fixtures/examples/table5.parsed +++ b/haddock-library/fixtures/examples/table5.parsed @@ -4,50 +4,43 @@ DocTable [TableCell {tableCellColspan = 1, tableCellContents = DocString - (concat - [" row 2 \n", - " \n", - " \n", - " row 3 "]), + (concat ["row 2\n", "\n", "\n", "row 3"]), tableCellRowspan = 2}, TableCell {tableCellColspan = 3, tableCellContents = DocAppend - (DocString " Use the command ") + (DocString "Use the command ") (DocAppend (DocMonospaced (DocString "ls | more")) - (DocString - (concat - [". \n", - " "]))), + (DocString ".\n")), tableCellRowspan = 1}], TableRow [TableCell {tableCellColspan = 1, - tableCellContents = DocString " ", + tableCellContents = DocEmpty, tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocString " ", + tableCellContents = DocEmpty, tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocString " ", + tableCellContents = DocEmpty, tableCellRowspan = 1}]], tableHeaderRows = [TableRow [TableCell {tableCellColspan = 1, - tableCellContents = DocString " row 1, col 1 ", + tableCellContents = DocString "row 1, col 1", tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocString " column 2 ", + tableCellContents = DocString "column 2", tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocString " column 3 ", + tableCellContents = DocString "column 3", tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocString " column 4 ", + tableCellContents = DocString "column 4", tableCellRowspan = 1}]]} -- cgit v1.2.3