From 4e34d366df31937cdc69b6b366355f10a84c16b2 Mon Sep 17 00:00:00 2001 From: despresc Date: Sat, 4 Apr 2020 16:35:42 -0400 Subject: Adapt to the newest Table type, fix some previous adaptation issues - Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared. --- src/Text/Pandoc/Lua/Walk.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/Text/Pandoc/Lua/Walk.hs') diff --git a/src/Text/Pandoc/Lua/Walk.hs b/src/Text/Pandoc/Lua/Walk.hs index 5b62001de..695c7b44e 100644 --- a/src/Text/Pandoc/Lua/Walk.hs +++ b/src/Text/Pandoc/Lua/Walk.hs @@ -59,6 +59,18 @@ instance Walkable (SingletonsList Inline) Row where walkM = walkRowM query = queryRow +instance Walkable (SingletonsList Inline) TableHead where + walkM = walkTableHeadM + query = queryTableHead + +instance Walkable (SingletonsList Inline) TableBody where + walkM = walkTableBodyM + query = queryTableBody + +instance Walkable (SingletonsList Inline) TableFoot where + walkM = walkTableFootM + query = queryTableFoot + instance Walkable (SingletonsList Inline) Caption where walkM = walkCaptionM query = queryCaption @@ -102,6 +114,18 @@ instance Walkable (SingletonsList Block) Row where walkM = walkRowM query = queryRow +instance Walkable (SingletonsList Block) TableHead where + walkM = walkTableHeadM + query = queryTableHead + +instance Walkable (SingletonsList Block) TableBody where + walkM = walkTableBodyM + query = queryTableBody + +instance Walkable (SingletonsList Block) TableFoot where + walkM = walkTableFootM + query = queryTableFoot + instance Walkable (SingletonsList Block) Caption where walkM = walkCaptionM query = queryCaption -- cgit v1.2.3