Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-pandoc-lua-marshal for 
openSUSE:Factory checked in at 2026-06-10 16:04:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-pandoc-lua-marshal (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-pandoc-lua-marshal.new.2375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-pandoc-lua-marshal"

Wed Jun 10 16:04:40 2026 rev:14 rq:1358419 version:0.3.2.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-pandoc-lua-marshal/ghc-pandoc-lua-marshal.changes
    2025-07-02 12:09:20.834329527 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-pandoc-lua-marshal.new.2375/ghc-pandoc-lua-marshal.changes
  2026-06-10 16:07:50.121223745 +0200
@@ -1,0 +2,28 @@
+Fri Jan  9 08:07:58 UTC 2026 - Peter Simons <[email protected]>
+
+- Update pandoc-lua-marshal to version 0.3.2.1.
+  ## 0.3.2.1
+
+  Released 2026-01-09.
+
+    * Added missing entry `test/test-table.lua` to
+      *extra-source-files* in cabal file.
+
+-------------------------------------------------------------------
+Thu Jan  8 16:25:27 UTC 2026 - Peter Simons <[email protected]>
+
+- Update pandoc-lua-marshal to version 0.3.2.
+  ## 0.3.2
+
+  Released 2026-01-08.
+
+    * Added a docstring to the `Pandoc.normalize` method.
+
+    * Added `TableBody` constructor. (Sean Soon)
+
+    * Fixed comments in files `TableFoot.hs` and `TableHead.hs`
+      (Sean Soon).
+
+    * Allow hslua-2.5 and containers-0.8.\*.
+
+-------------------------------------------------------------------

Old:
----
  pandoc-lua-marshal-0.3.1.tar.gz

New:
----
  pandoc-lua-marshal-0.3.2.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-pandoc-lua-marshal.spec ++++++
--- /var/tmp/diff_new_pack.P1S1zG/_old  2026-06-10 16:07:52.669329339 +0200
+++ /var/tmp/diff_new_pack.P1S1zG/_new  2026-06-10 16:07:52.673329505 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-pandoc-lua-marshal
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
 %global pkgver %{pkg_name}-%{version}
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.3.1
+Version:        0.3.2.1
 Release:        0
 Summary:        Use pandoc types in Lua
 License:        MIT

++++++ pandoc-lua-marshal-0.3.1.tar.gz -> pandoc-lua-marshal-0.3.2.1.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-lua-marshal-0.3.1/CHANGELOG.md 
new/pandoc-lua-marshal-0.3.2.1/CHANGELOG.md
--- old/pandoc-lua-marshal-0.3.1/CHANGELOG.md   2001-09-09 03:46:40.000000000 
+0200
+++ new/pandoc-lua-marshal-0.3.2.1/CHANGELOG.md 2001-09-09 03:46:40.000000000 
+0200
@@ -2,6 +2,26 @@
 
 `pandoc-lua-marshal` uses [PVP Versioning][].
 
+## 0.3.2.1
+
+Released 2026-01-09.
+
+  * Added missing entry `test/test-table.lua` to
+    *extra-source-files* in cabal file.
+
+## 0.3.2
+
+Released 2026-01-08.
+
+  * Added a docstring to the `Pandoc.normalize` method.
+
+  * Added `TableBody` constructor. (Sean Soon)
+
+  * Fixed comments in files `TableFoot.hs` and `TableHead.hs`
+    (Sean Soon).
+
+  * Allow hslua-2.5 and containers-0.8.\*.
+
 ## 0.3.1
 
 Released 2025-06-23.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-lua-marshal-0.3.1/LICENSE 
new/pandoc-lua-marshal-0.3.2.1/LICENSE
--- old/pandoc-lua-marshal-0.3.1/LICENSE        2001-09-09 03:46:40.000000000 
+0200
+++ new/pandoc-lua-marshal-0.3.2.1/LICENSE      2001-09-09 03:46:40.000000000 
+0200
@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2021-2025 Albert Krewinkel
+Copyright (c) 2021-2026 Albert Krewinkel
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-lua-marshal-0.3.1/pandoc-lua-marshal.cabal 
new/pandoc-lua-marshal-0.3.2.1/pandoc-lua-marshal.cabal
--- old/pandoc-lua-marshal-0.3.1/pandoc-lua-marshal.cabal       2001-09-09 
03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/pandoc-lua-marshal.cabal     2001-09-09 
03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:       2.4
 name:                pandoc-lua-marshal
-version:             0.3.1
+version:             0.3.2.1
 synopsis:            Use pandoc types in Lua
 description:         This package provides functions to marshal and unmarshal
                      pandoc document types to and from Lua.
@@ -19,17 +19,12 @@
 license-file:        LICENSE
 author:              Albert Krewinkel, John MacFarlane
 maintainer:          Albert Krewinkel <[email protected]>
-copyright:           © 2017-2025 Albert Krewinkel, John MacFarlane
+copyright:           © 2017-2026 Albert Krewinkel, John MacFarlane
 category:            Foreign
 build-type:          Simple
 extra-doc-files:     README.md
                    , CHANGELOG.md
-tested-with:         GHC == 8.8.4
-                   , GHC == 8.10.7
-                   , GHC == 9.0.2
-                   , GHC == 9.2.5
-                   , GHC == 9.4.4
-                   , GHC == 9.6
+tested-with:         GHC == 9.6
                    , GHC == 9.8
                    , GHC == 9.10
                    , GHC == 9.12
@@ -42,6 +37,7 @@
                    , test/test-metavalue.lua
                    , test/test-pandoc.lua
                    , test/test-simpletable.lua
+                   , test/test-table.lua
 
 source-repository head
   type:                git
@@ -51,11 +47,11 @@
   build-depends:       base                  >= 4.12     && < 5
                      , aeson                 >= 1.5      && < 2.3
                      , bytestring            >= 0.10     && < 0.13
-                     , containers            >= 0.6      && < 0.8
+                     , containers            >= 0.6      && < 0.9
                      , exceptions            >= 0.8      && < 0.11
-                     , hslua                 >= 2.2      && < 2.5
+                     , hslua                 >= 2.2      && < 2.6
                      , hslua-list            >= 1.1.4    && < 1.2
-                     , hslua-marshalling     >= 2.2      && < 2.4
+                     , hslua-marshalling     >= 2.3      && < 2.4
                      , pandoc-types          >= 1.23     && < 1.24
                      , safe                  >= 0.3      && < 0.4
                      , text                  >= 1.1.1.0  && < 1.3
@@ -66,12 +62,11 @@
                        -Widentities
                        -Wincomplete-record-updates
                        -Wincomplete-uni-patterns
+                       -Wmissing-deriving-strategies
                        -Wmissing-export-lists
                        -Wpartial-fields
                        -Wredundant-constraints
                        -fhide-source-paths
-  if impl(ghc >= 8.8)
-    ghc-options:       -Wmissing-deriving-strategies
 
   default-language:    Haskell2010
 
@@ -98,6 +93,7 @@
                      , Text.Pandoc.Lua.Marshal.QuoteType
                      , Text.Pandoc.Lua.Marshal.Row
                      , Text.Pandoc.Lua.Marshal.SimpleTable
+                     , Text.Pandoc.Lua.Marshal.TableBody
                      , Text.Pandoc.Lua.Marshal.TableFoot
                      , Text.Pandoc.Lua.Marshal.TableHead
                      , Text.Pandoc.Lua.Marshal.TableParts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/AST.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/AST.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/AST.hs     
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/AST.hs   
2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 {- |
-Copyright  : © 2021-2025 Albert Krewinkel
+Copyright  : © 2021-2026 Albert Krewinkel
 License    : MIT
 Maintainer : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Alignment.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Alignment.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Alignment.hs       
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Alignment.hs     
2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Block.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Block.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Block.hs   
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Block.hs 
2001-09-09 03:46:40.000000000 +0200
@@ -49,7 +49,7 @@
 import Text.Pandoc.Lua.Marshal.Shared (walkBlocksAndInlines)
 import Text.Pandoc.Lua.Marshal.TableParts
   ( peekColSpec, pushColSpec
-  , peekTableBody, pushTableBody
+  , peekTableBodyFuzzy, pushTableBody
   , peekTableFoot, pushTableFoot
   , peekTableHead, pushTableHead
   )
@@ -188,7 +188,7 @@
       (pushPandocList pushTableBody, \case
           Table _ _ _ _ bs _ -> Actual bs
           _                  -> Absent)
-      (peekList peekTableBody, \case
+      (peekList peekTableBodyFuzzy, \case
           Table attr c cs h _ f -> Actual . (\bs -> Table attr c cs h bs f)
           _                     -> const Absent)
   , possibleProperty "caption" "element caption"
@@ -455,7 +455,7 @@
     <#> parameter (peekList peekColSpec) "{ColSpec,...}" "colspecs"
                   "column alignments and widths"
     <#> parameter peekTableHead "TableHead" "head" "table head"
-    <#> parameter (peekList peekTableBody) "{TableBody,...}" "bodies"
+    <#> parameter (peekList peekTableBodyFuzzy) "{TableBody,...}" "bodies"
                   "table bodies"
     <#> parameter peekTableFoot "TableFoot" "foot" "table foot"
     <#> optAttrParam
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Caption.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Caption.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Caption.hs 
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Caption.hs       
2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 {-# LANGUAGE OverloadedStrings    #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Cell.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Cell.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Cell.hs    
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Cell.hs  
2001-09-09 03:46:40.000000000 +0200
@@ -1,7 +1,7 @@
 {-# LANGUAGE OverloadedStrings    #-}
 {-# LANGUAGE LambdaCase           #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Citation.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Citation.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Citation.hs        
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Citation.hs      
2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 {-# LANGUAGE OverloadedStrings    #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/CitationMode.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/CitationMode.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/CitationMode.hs    
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/CitationMode.hs  
2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Content.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Content.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Content.hs 
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Content.hs       
2001-09-09 03:46:40.000000000 +0200
@@ -1,7 +1,7 @@
 {-# LANGUAGE LambdaCase        #-}
 {-# LANGUAGE OverloadedStrings #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Filter.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Filter.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Filter.hs  
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Filter.hs        
2001-09-09 03:46:40.000000000 +0200
@@ -3,7 +3,7 @@
 {-# LANGUAGE TypeApplications     #-}
 {-# LANGUAGE ScopedTypeVariables  #-}
 {- |
-Copyright  : © 2021-2025 Albert Krewinkel
+Copyright  : © 2021-2026 Albert Krewinkel
 License    : MIT
 Maintainer : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Format.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Format.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Format.hs  
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Format.hs        
2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/List.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/List.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/List.hs    
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/List.hs  
2001-09-09 03:46:40.000000000 +0200
@@ -1,7 +1,7 @@
 {-# LANGUAGE LambdaCase        #-}
 {-# LANGUAGE OverloadedStrings #-}
 {- |
-Copyright  : © 2021-2025 Albert Krewinkel
+Copyright  : © 2021-2026 Albert Krewinkel
 License    : MIT
 Maintainer : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/ListAttributes.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/ListAttributes.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/ListAttributes.hs  
2001-09-09 03:46:40.000000000 +0200
+++ 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/ListAttributes.hs    
    2001-09-09 03:46:40.000000000 +0200
@@ -1,7 +1,7 @@
 {-# LANGUAGE OverloadedStrings    #-}
 {-# LANGUAGE TupleSections        #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/MathType.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/MathType.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/MathType.hs        
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/MathType.hs      
2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/MetaValue.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/MetaValue.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/MetaValue.hs       
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/MetaValue.hs     
2001-09-09 03:46:40.000000000 +0200
@@ -3,7 +3,7 @@
 {-# LANGUAGE ScopedTypeVariables  #-}
 {-# LANGUAGE TypeApplications     #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
@@ -55,7 +55,7 @@
       (MetaInlines . (:[]) <$!> peekInline idx) <|>
       (MetaBlocks . (:[]) <$!> peekBlock idx)
 
-    TypeTable   -> optional (getName idx) >>= \case
+    TypeTable   -> optional (getName' idx) >>= \case
       Just "Inlines" -> MetaInlines <$!> peekInlinesFuzzy idx
       Just "Blocks"  -> MetaBlocks  <$!> peekBlocksFuzzy idx
       Just "List"    -> MetaList <$!> peekList peekMetaValue idx
@@ -71,7 +71,7 @@
     _ -> failPeek "could not get meta value"
 
  where
-  getName idx = liftLua (getmetafield idx "__name") >>= \case
+  getName' idx = liftLua (getmetafield idx "__name") >>= \case
     TypeNil -> failPeek "no name"
     _ -> peekName idx `lastly` pop 1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Pandoc.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Pandoc.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Pandoc.hs  
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Pandoc.hs        
2001-09-09 03:46:40.000000000 +0200
@@ -3,7 +3,7 @@
 {-# LANGUAGE OverloadedStrings    #-}
 {-# LANGUAGE TypeApplications     #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
@@ -83,6 +83,9 @@
       ### liftPure normalize
       <#> udparam typePandoc "self" ""
       =#> udresult typePandoc "cloned and normalized document"
+      #? "Perform a normalization of Pandoc documents. E.g., multiple\
+          \ successive spaces are collapsed, and tables are normalized, so\
+          \ that all rows and columns contain the same number of cells."
 
   , method $ defun "walk"
     ### flip applyFully
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/QuoteType.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/QuoteType.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/QuoteType.hs       
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/QuoteType.hs     
2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Row.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Row.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Row.hs     
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Row.hs   
2001-09-09 03:46:40.000000000 +0200
@@ -1,7 +1,7 @@
 {-# LANGUAGE OverloadedStrings    #-}
 {-# LANGUAGE LambdaCase           #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Shared.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Shared.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/Shared.hs  
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/Shared.hs        
2001-09-09 03:46:40.000000000 +0200
@@ -1,7 +1,7 @@
 {-# LANGUAGE FlexibleContexts     #-}
 {-# LANGUAGE OverloadedStrings    #-}
 {- |
-Copyright   : © 2021-2025 Albert Krewinkel
+Copyright   : © 2021-2026 Albert Krewinkel
 License     : MIT
 Maintainer  : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/SimpleTable.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/SimpleTable.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/SimpleTable.hs     
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/SimpleTable.hs   
2001-09-09 03:46:40.000000000 +0200
@@ -2,7 +2,7 @@
 {-# LANGUAGE OverloadedStrings    #-}
 {-# LANGUAGE ScopedTypeVariables  #-}
 {- |
-Copyright   : © 2021-2025 Albert Krewinkel
+Copyright   : © 2021-2026 Albert Krewinkel
 License     : MIT
 Maintainer  : Albert Krewinkel <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/TableBody.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/TableBody.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/TableBody.hs       
1970-01-01 01:00:00.000000000 +0100
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/TableBody.hs     
2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,109 @@
+{-# LANGUAGE OverloadedStrings    #-}
+{-# LANGUAGE LambdaCase           #-}
+{- |
+Copyright               : © 2021-2026 Albert Krewinkel,
+                          © 2025-2026 Sean Soon
+SPDX-License-Identifier : MIT
+Maintainer              : Albert Krewinkel <[email protected]>
+
+Marshaling/unmarshaling functions of 'TableBody' values.
+-}
+module Text.Pandoc.Lua.Marshal.TableBody
+  ( peekTableBody
+  , peekTableBodyFuzzy
+  , pushTableBody
+  , typeTableBody
+  , mkTableBody
+  ) where
+
+import Control.Applicative (optional)
+import Data.Aeson (encode)
+import Data.Maybe (fromMaybe)
+import HsLua
+import Text.Pandoc.Lua.Marshal.Attr (peekAttr, pushAttr)
+import Text.Pandoc.Lua.Marshal.List (pushPandocList)
+import Text.Pandoc.Lua.Marshal.Row (peekRowFuzzy, pushRow)
+import Text.Pandoc.Definition
+
+-- | Push a TableBody as a userdata value.
+pushTableBody :: LuaError e => TableBody -> LuaE e ()
+pushTableBody = pushUD typeTableBody
+
+-- | Retrieves a TableBody from the stack.
+peekTableBody :: LuaError e => Peeker e TableBody
+peekTableBody = peekUD typeTableBody
+
+-- | Retrieves a TableBody from the stack, accepting either a 
+-- 'pandoc TableBody' userdata object or a table with fields @attr@,
+-- @body@, @head@, @row_head_columns@.
+peekTableBodyFuzzy :: LuaError e => Peeker e TableBody
+peekTableBodyFuzzy idx = retrieving "TableBody" $ liftLua (ltype idx) >>= \case
+  TypeUserdata -> peekTableBody idx
+  TypeTable -> do
+    attr <- peekFieldRaw peekAttr "attr" idx
+    body <- peekFieldRaw (peekList peekRowFuzzy) "body" idx
+    ihead <- peekFieldRaw (peekList peekRowFuzzy) "head" idx
+    rhc <- peekFieldRaw (fmap RowHeadColumns . peekIntegral) 
"row_head_columns" idx
+    return $! TableBody attr rhc ihead body
+  _ -> failPeek =<< typeMismatchMessage "Cell or table" idx
+
+-- | TableBody object type.
+typeTableBody :: LuaError e => DocumentedType e TableBody
+typeTableBody = deftype "TableBody"
+  [ operation Eq $ defun "__eq"
+     ### liftPure2 (\a b -> fromMaybe False ((==) <$> a <*> b))
+     <#> parameter (optional . peekTableBody) "TableBody" "self" ""
+     <#> parameter (optional . peekTableBody) "any" "object" ""
+     =#> functionResult pushBool "boolean" "true iff the two values are equal"
+  , operation Tostring $ lambda
+    ### liftPure show
+    <#> parameter peekTableBody "TableBody" "self" ""
+    =#> functionResult pushString "string" "native Haskell representation"
+  , operation (CustomOperation "__tojson") $ lambda
+    ### liftPure encode
+    <#> udparam typeTableBody "self" ""
+    =#> functionResult pushLazyByteString "string" "JSON representation"
+  ]
+  [ property "attr" "table body attributes"
+      (pushAttr, \(TableBody attr _ _ _) -> attr)
+      (peekAttr, \(TableBody _ body ihead rhc) attr ->
+                   TableBody attr body ihead rhc)
+  , property "row_head_columns" "number of columns taken up by the row head of 
each row of the TableBody"
+    (pushIntegral, \(TableBody _ (RowHeadColumns rhc) _ _) -> rhc)
+    (peekIntegral, \(TableBody attr _ ihead body) rhc ->
+                      TableBody attr (RowHeadColumns rhc) ihead body)
+  , property "head" "intermediate head"
+      (pushPandocList pushRow, \(TableBody _ _ ihead _) -> ihead)
+      (peekList peekRowFuzzy, \(TableBody attr rhc _ body) ihead ->
+                                TableBody attr rhc ihead body)
+  , property "body" "table body rows"
+      (pushPandocList pushRow, \(TableBody _ _ _ body) -> body)
+      (peekList peekRowFuzzy, \(TableBody attr rhc ihead _) body ->
+                                TableBody attr rhc ihead body)
+  , alias "identifier" "cell ID"         ["attr", "identifier"]
+  , alias "classes"    "cell classes"    ["attr", "classes"]
+  , alias "attributes" "cell attributes" ["attr", "attributes"]
+
+  , method $ defun "clone"
+    ### return
+    <#> parameter peekTableBody "TableBody" "self" ""
+    =#> functionResult pushTableBody "TableBody" "cloned object"
+  ]
+
+-- | Constructor function for 'TableBody' values.
+mkTableBody :: LuaError e => DocumentedFunction e
+mkTableBody = defun "TableBody"
+  ### liftPure4 (\mBody mHead mRhc mAttr -> TableBody
+                  (fromMaybe nullAttr mAttr)
+                  (maybe 0 RowHeadColumns mRhc)
+                  (fromMaybe [] mHead)
+                  (fromMaybe [] mBody))
+  <#> opt (parameter (peekList peekRowFuzzy) "{Row,...}" "body"
+           "list of table rows")
+  <#> opt (parameter (peekList peekRowFuzzy) "{Row,...}" "head"
+           "intermediate head")
+  <#> opt (parameter peekIntegral "integer" "row_head_columns"
+           "number of columns taken up by the row head of each row of the 
TableBody")
+  <#> opt (parameter peekAttr "Attr" "attr" "table body attributes")
+  =#> functionResult pushTableBody "TableBody" "new TableBody object"
+  #? "Creates a table body."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/TableFoot.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/TableFoot.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/TableFoot.hs       
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/TableFoot.hs     
2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 {-# LANGUAGE OverloadedStrings    #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
@@ -26,11 +26,11 @@
 pushTableFoot :: LuaError e => TableFoot -> LuaE e ()
 pushTableFoot = pushUD typeTableFoot
 
--- | Retrieves a 'Cell' from the stack.
+-- | Retrieves a TableFoot from the stack.
 peekTableFoot :: LuaError e => Peeker e TableFoot
 peekTableFoot = peekUD typeTableFoot
 
--- | Row object type.
+-- | TableFoot object type.
 typeTableFoot :: LuaError e => DocumentedType e TableFoot
 typeTableFoot = deftype "TableFoot"
   [ operation Eq $ defun "__eq"
@@ -66,7 +66,7 @@
     =#> functionResult pushTableFoot "TableFoot" "cloned object"
   ]
 
--- | Constructor function for 'Row' values.
+-- | Constructor function for TableFoot values.
 mkTableFoot :: LuaError e => DocumentedFunction e
 mkTableFoot = defun "TableFoot"
   ### liftPure2 (\mCells mAttr -> TableFoot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/TableHead.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/TableHead.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/TableHead.hs       
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/TableHead.hs     
2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 {-# LANGUAGE OverloadedStrings    #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
@@ -26,11 +26,11 @@
 pushTableHead :: LuaError e => TableHead -> LuaE e ()
 pushTableHead = pushUD typeTableHead
 
--- | Retrieves a 'Cell' from the stack.
+-- | Retrieves a TableHead from the stack.
 peekTableHead :: LuaError e => Peeker e TableHead
 peekTableHead = peekUD typeTableHead
 
--- | Row object type.
+-- | TableHead object type.
 typeTableHead :: LuaError e => DocumentedType e TableHead
 typeTableHead = deftype "TableHead"
   [ operation Eq $ defun "__eq"
@@ -66,7 +66,7 @@
     =#> functionResult pushTableHead "TableHead" "cloned object"
   ]
 
--- | Constructor function for 'Row' values.
+-- | Constructor function for TableHead values.
 mkTableHead :: LuaError e => DocumentedFunction e
 mkTableHead = defun "TableHead"
   ### liftPure2 (\mRows mAttr -> TableHead
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/TableParts.hs 
new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/TableParts.hs
--- old/pandoc-lua-marshal-0.3.1/src/Text/Pandoc/Lua/Marshal/TableParts.hs      
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/src/Text/Pandoc/Lua/Marshal/TableParts.hs    
2001-09-09 03:46:40.000000000 +0200
@@ -1,7 +1,7 @@
 {-# LANGUAGE LambdaCase           #-}
 {-# LANGUAGE OverloadedStrings    #-}
 {- |
-Copyright               : © 2021-2025 Albert Krewinkel
+Copyright               : © 2021-2026 Albert Krewinkel
 SPDX-License-Identifier : MIT
 Maintainer              : Albert Krewinkel <[email protected]>
 
@@ -15,6 +15,7 @@
   , peekRowFuzzy
   , pushRow
   , peekTableBody
+  , peekTableBodyFuzzy
   , pushTableBody
   , peekTableFoot
   , pushTableFoot
@@ -22,6 +23,7 @@
   , pushTableHead
     -- * Constructors
   , mkRow
+  , mkTableBody
   , mkTableFoot
   , mkTableHead
   ) where
@@ -30,9 +32,8 @@
 import Control.Monad ((<$!>))
 import HsLua
 import Text.Pandoc.Lua.Marshal.Alignment (peekAlignment, pushAlignment)
-import Text.Pandoc.Lua.Marshal.Attr (peekAttr, pushAttr)
-import Text.Pandoc.Lua.Marshal.List (pushPandocList)
 import Text.Pandoc.Lua.Marshal.Row
+import Text.Pandoc.Lua.Marshal.TableBody
 import Text.Pandoc.Lua.Marshal.TableFoot
 import Text.Pandoc.Lua.Marshal.TableHead
 import Text.Pandoc.Definition
@@ -55,31 +56,3 @@
 pushColWidth = \case
   (ColWidth w)    -> push w
   ColWidthDefault -> pushnil
-
--- | Pushes a 'TableBody' value as a Lua table with fields @attr@,
--- @row_head_columns@, @head@, and @body@.
-pushTableBody :: LuaError e => Pusher e TableBody
-pushTableBody (TableBody attr (RowHeadColumns rowHeadColumns) head' body) = do
-    newtable
-    addField "attr" (pushAttr attr)
-    addField "row_head_columns" (pushIntegral rowHeadColumns)
-    addField "head" (pushPandocList pushRow head')
-    addField "body" (pushPandocList pushRow body)
-
--- | Retrieves a 'TableBody' value from a Lua table with fields @attr@,
--- @row_head_columns@, @head@, and @body@.
-peekTableBody :: LuaError e => Peeker e TableBody
-peekTableBody = fmap (retrieving "TableBody")
-  . typeChecked "table" istable
-  $ \idx -> TableBody
-  <$!> peekFieldRaw peekAttr "attr" idx
-  <*>  peekFieldRaw (fmap RowHeadColumns . peekIntegral) "row_head_columns" idx
-  <*>  peekFieldRaw (peekList peekRowFuzzy) "head" idx
-  <*>  peekFieldRaw (peekList peekRowFuzzy) "body" idx
-
--- | Add a value to the table at the top of the stack at a string-index.
-addField :: LuaError e => Name -> LuaE e () -> LuaE e ()
-addField key pushFieldValue = do
-  pushName key
-  pushFieldValue
-  rawset (nth 3)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandoc-lua-marshal-0.3.1/test/test-pandoc-lua-marshal.hs 
new/pandoc-lua-marshal-0.3.2.1/test/test-pandoc-lua-marshal.hs
--- old/pandoc-lua-marshal-0.3.1/test/test-pandoc-lua-marshal.hs        
2001-09-09 03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/test/test-pandoc-lua-marshal.hs      
2001-09-09 03:46:40.000000000 +0200
@@ -74,6 +74,10 @@
     registerDefault
     translateResultsFromFile "test/test-pandoc.lua"
 
+  tableTests <- run @Lua.Exception $ do
+    registerDefault
+    translateResultsFromFile "test/test-table.lua"
+
   defaultMain $ testGroup "pandoc-lua-marshal"
     [ roundtrips
     , listAttributeTests
@@ -85,6 +89,7 @@
     , simpleTableTests
     , metavalueTests
     , pandocTests
+    , tableTests
     ]
 
 -- | Registers all constructors and string constants in the global
@@ -102,6 +107,7 @@
   register' mkPandoc
   register' mkRow
   register' mkSimpleTable
+  register' mkTableBody
   register' mkTableHead
   register' mkTableFoot
   registerConstants (Proxy @Alignment)
@@ -182,7 +188,7 @@
     ioProperty . roundtripEqual pushQuoteType peekQuoteType
 
   , testProperty "TableBody" $
-    ioProperty . roundtripEqual pushTableBody peekTableBody
+    ioProperty . roundtripEqual pushTableBody peekTableBodyFuzzy
 
   , testProperty "TableHead" $
     ioProperty . roundtripEqual pushTableHead peekTableHead
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-lua-marshal-0.3.1/test/test-pandoc.lua 
new/pandoc-lua-marshal-0.3.2.1/test/test-pandoc.lua
--- old/pandoc-lua-marshal-0.3.1/test/test-pandoc.lua   2001-09-09 
03:46:40.000000000 +0200
+++ new/pandoc-lua-marshal-0.3.2.1/test/test-pandoc.lua 2001-09-09 
03:46:40.000000000 +0200
@@ -86,7 +86,6 @@
       }
       local tfoot = TableFoot()
       local tbl = Table(caption, colspecs, thead, {tbody}, tfoot)
-      print(tbl.bodies)
       local expected_body = tbody
       expected_body.body[2].cells:insert(Cell{})
       local doc = Pandoc{tbl}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-lua-marshal-0.3.1/test/test-table.lua 
new/pandoc-lua-marshal-0.3.2.1/test/test-table.lua
--- old/pandoc-lua-marshal-0.3.1/test/test-table.lua    1970-01-01 
01:00:00.000000000 +0100
+++ new/pandoc-lua-marshal-0.3.2.1/test/test-table.lua  2001-09-09 
03:46:40.000000000 +0200
@@ -0,0 +1,77 @@
+local tasty = require 'tasty'
+
+local test = tasty.test_case
+local group = tasty.test_group
+local assert = tasty.assert
+
+return {
+  group "TableBody" {
+    group 'Constructor' {
+      test('row_head_columns defaults to 0', function ()
+        local tbl_body = TableBody{}
+        assert.are_equal(tbl_body.row_head_columns, 0)
+      end),
+      test('attr defaults to null Attr', function ()
+        local tbl_body = TableBody{}
+        assert.are_equal(tbl_body.attr, Attr())
+      end),
+      test('Table constructor', function ()
+        local old_body = {
+          attr={ 'tbl-body' },
+          body={ Row{ Cell('body cell') } },
+          head={ Row{ Cell('head cell') } },
+          row_head_columns=1
+        }
+        local old_tbl = Table({}, {}, TableHead(), { old_body }, TableFoot())
+
+        local new_body = TableBody(
+          { Row{ Cell('body cell') } },
+          { Row{ Cell('head cell') } },
+          1,
+          { 'tbl-body' }
+        )
+        local new_tbl = Table({}, {}, TableHead(), { new_body }, TableFoot())
+        assert.are_equal(old_tbl, new_tbl)
+      end),
+    },
+    group 'properties' {
+      test('modify body', function ()
+        local tbl_body = TableBody{}
+        tbl_body.body = { Row{ Cell('pass') } }
+        assert.are_equal(TableBody({ Row{ Cell('pass') } }, {}, 0), tbl_body)
+      end),
+      test('modify head', function ()
+        local tbl_body = TableBody{}
+        tbl_body.head = { Row{ Cell('pass') } }
+        assert.are_equal(TableBody({}, { Row{ Cell('pass') } }, 0), tbl_body)
+      end),
+      test('modify row_head_columns', function ()
+        local tbl_body = TableBody{}
+        tbl_body.row_head_columns = 5
+        assert.are_equal(TableBody({}, {}, 5), tbl_body)
+      end),
+      test('modify attr', function ()
+        local tbl_body = TableBody({}, {}, 0, Attr('before'))
+        tbl_body.attr = Attr('after')
+        assert.are_equal(TableBody({}, {}, 0, Attr('after')), tbl_body)
+      end),
+    },
+    group 'aliases' {
+      test('identifier', function ()
+        local tbl_body = TableBody{}
+        tbl_body.identifier = 'yep'
+        assert.are_same(TableBody({}, {}, 0, 'yep'), tbl_body)
+      end),
+      test('classes', function ()
+        local tbl_body = TableBody{}
+        tbl_body.classes = {'java'}
+        assert.are_same(TableBody({}, {}, 0, {'', {'java'}}), tbl_body)
+      end),
+      test('attributes', function ()
+        local tbl_body = TableBody{}
+        tbl_body.attributes.precipitation = 'snow'
+        assert.are_same(TableBody({}, {}, 0, {precipitation='snow'}), tbl_body)
+      end),
+    },
+  },
+}

Reply via email to