From 10c6c411f9bd582ce9bafe159728f322a54395cd Mon Sep 17 00:00:00 2001 From: Christian Despres <50160106+despresc@users.noreply.github.com> Date: Sat, 5 Sep 2020 17:36:51 -0400 Subject: Add Writers.Tables helper functions and types, add tests for those (#6655) Add Writers.Tables helper functions and types, add tests for those The Writers.Tables module contains an AnnTable type that is a pandoc Table with added inferred information that should be enough for writers (in particular the HTML writer) to operate on without having to lay out the table themselves. The toAnnTable and fromAnnTable functions in that module convert between AnnTable and Table. In addition to producing an AnnTable with coherent and well-formed annotations, the toAnnTable function also normalizes its input Table like the table builder does. Various tests ensure that toAnnTable normalizes tables exactly like the table builder, and that its annotations are coherent. --- test/test-pandoc.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/test-pandoc.hs') diff --git a/test/test-pandoc.hs b/test/test-pandoc.hs index d0a1a6f18..50c7d5b09 100644 --- a/test/test-pandoc.hs +++ b/test/test-pandoc.hs @@ -44,6 +44,7 @@ import qualified Tests.Writers.Org import qualified Tests.Writers.Plain import qualified Tests.Writers.Powerpoint import qualified Tests.Writers.RST +import qualified Tests.Writers.Tables import qualified Tests.Writers.TEI import Tests.Helpers (findPandoc) import Text.Pandoc.Shared (inDirectory) @@ -72,6 +73,7 @@ tests pandocPath = testGroup "pandoc tests" , testGroup "FB2" Tests.Writers.FB2.tests , testGroup "PowerPoint" Tests.Writers.Powerpoint.tests , testGroup "Ms" Tests.Writers.Ms.tests + , testGroup "Tables" Tests.Writers.Tables.tests ] , testGroup "Readers" [ testGroup "LaTeX" Tests.Readers.LaTeX.tests -- cgit v1.2.3