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 --- .../fixtures/examples/table-simple.parsed | 28 +++++++--------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'haddock-library/fixtures/examples/table-simple.parsed') diff --git a/haddock-library/fixtures/examples/table-simple.parsed b/haddock-library/fixtures/examples/table-simple.parsed index b5e62453..d027c75d 100644 --- a/haddock-library/fixtures/examples/table-simple.parsed +++ b/haddock-library/fixtures/examples/table-simple.parsed @@ -3,50 +3,40 @@ DocTable {tableBodyRows = [TableRow [TableCell {tableCellColspan = 1, - tableCellContents = DocString " 200 ", + tableCellContents = DocString "200", tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocAppend - (DocString " ") - (DocAppend - (DocMonospaced (DocString "OK")) - (DocString " ")), + tableCellContents = DocMonospaced (DocString "OK"), tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocString - " operation successful ", + tableCellContents = DocString "operation successful", tableCellRowspan = 1}], TableRow [TableCell {tableCellColspan = 1, - tableCellContents = DocString " 204 ", + tableCellContents = DocString "204", tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocAppend - (DocString " ") - (DocAppend - (DocMonospaced (DocString "No Content")) - (DocString " ")), + tableCellContents = DocMonospaced (DocString "No Content"), tableCellRowspan = 1}, TableCell {tableCellColspan = 1, tableCellContents = DocString - " operation successful, no body returned ", + "operation successful, no body returned", tableCellRowspan = 1}]], tableHeaderRows = [TableRow [TableCell {tableCellColspan = 1, - tableCellContents = DocString " code ", + tableCellContents = DocString "code", tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocString " message ", + tableCellContents = DocString "message", tableCellRowspan = 1}, TableCell {tableCellColspan = 1, - tableCellContents = DocString - " description ", + tableCellContents = DocString "description", tableCellRowspan = 1}]]} -- cgit v1.2.3