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 2024-05-14 13:38:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-pandoc-lua-marshal (Old) and /work/SRC/openSUSE:Factory/.ghc-pandoc-lua-marshal.new.1880 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-pandoc-lua-marshal" Tue May 14 13:38:08 2024 rev:9 rq:1173801 version:0.2.7 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-pandoc-lua-marshal/ghc-pandoc-lua-marshal.changes 2024-05-01 14:57:46.304780825 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-pandoc-lua-marshal.new.1880/ghc-pandoc-lua-marshal.changes 2024-05-14 13:39:24.396873083 +0200 @@ -1,0 +2,20 @@ +Mon May 6 15:06:05 UTC 2024 - Peter Simons <psim...@suse.com> + +- Update pandoc-lua-marshal to version 0.2.7. + ## 0.2.7 + + Released 2024-05-06. + + - Let the behavior of `content` attributes on BulletList and + OrderedList elements match that of the constructor by treating + a list of Block elements as a list of single-block items. The + following assertion now holds true: + + ``` lua + local content = {pandoc.Plain "one", pandoc.Plain "two"} + local bl = pandoc.BulletList{} + bl.content = content + assert(bl == pandoc.BulletList(content)) + ``` + +------------------------------------------------------------------- Old: ---- pandoc-lua-marshal-0.2.6.tar.gz pandoc-lua-marshal.cabal New: ---- pandoc-lua-marshal-0.2.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-pandoc-lua-marshal.spec ++++++ --- /var/tmp/diff_new_pack.i6bmB2/_old 2024-05-14 13:39:25.836925595 +0200 +++ /var/tmp/diff_new_pack.i6bmB2/_new 2024-05-14 13:39:25.840925741 +0200 @@ -20,13 +20,12 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.2.6 +Version: 0.2.7 Release: 0 Summary: Use pandoc types in Lua License: MIT URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-aeson-prof @@ -105,7 +104,6 @@ %prep %autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ pandoc-lua-marshal-0.2.6.tar.gz -> pandoc-lua-marshal-0.2.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-lua-marshal-0.2.6/CHANGELOG.md new/pandoc-lua-marshal-0.2.7/CHANGELOG.md --- old/pandoc-lua-marshal-0.2.6/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-lua-marshal-0.2.7/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -2,6 +2,22 @@ `pandoc-lua-marshal` uses [PVP Versioning][]. +## 0.2.7 + +Released 2024-05-06. + +- Let the behavior of `content` attributes on BulletList and + OrderedList elements match that of the constructor by treating + a list of Block elements as a list of single-block items. The + following assertion now holds true: + + ``` lua + local content = {pandoc.Plain "one", pandoc.Plain "two"} + local bl = pandoc.BulletList{} + bl.content = content + assert(bl == pandoc.BulletList(content)) + ``` + ## 0.2.6 Released 2024-03-29. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-lua-marshal-0.2.6/pandoc-lua-marshal.cabal new/pandoc-lua-marshal-0.2.7/pandoc-lua-marshal.cabal --- old/pandoc-lua-marshal-0.2.6/pandoc-lua-marshal.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-lua-marshal-0.2.7/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.2.6 +version: 0.2.7 synopsis: Use pandoc types in Lua description: This package provides functions to marshal and unmarshal pandoc document types to and from Lua. @@ -109,7 +109,7 @@ hs-source-dirs: test main-is: test-pandoc-lua-marshal.hs build-depends: pandoc-lua-marshal - , QuickCheck >= 2.4 && < 2.15 + , QuickCheck >= 2.4 && < 2.16 , tasty >= 0.11 , tasty-hunit >= 0.9 , tasty-lua >= 1.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-lua-marshal-0.2.6/src/Text/Pandoc/Lua/Marshal/Block.hs new/pandoc-lua-marshal-0.2.7/src/Text/Pandoc/Lua/Marshal/Block.hs --- old/pandoc-lua-marshal-0.2.6/src/Text/Pandoc/Lua/Marshal/Block.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-lua-marshal-0.2.7/src/Text/Pandoc/Lua/Marshal/Block.hs 2001-09-09 03:46:40.000000000 +0200 @@ -307,7 +307,7 @@ c -> throwM . luaException @e $ "expected definition items, got " <> contentTypeDescription c listItemContent = \case - ContentBlocks blks -> [blks] + ContentBlocks blks -> map (:[]) blks ContentLines lns -> map ((:[]) . Plain) lns ContentListItems itms -> itms c -> throwM . luaException @e $ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-lua-marshal-0.2.6/src/Text/Pandoc/Lua/Marshal/Content.hs new/pandoc-lua-marshal-0.2.7/src/Text/Pandoc/Lua/Marshal/Content.hs --- old/pandoc-lua-marshal-0.2.6/src/Text/Pandoc/Lua/Marshal/Content.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-lua-marshal-0.2.7/src/Text/Pandoc/Lua/Marshal/Content.hs 2001-09-09 03:46:40.000000000 +0200 @@ -39,7 +39,7 @@ | ContentDefItems [([Inline], [[Block]])] | ContentListItems [[Block]] --- | Gets the text property of an Inline, if present. +-- | Returns a human-readable type description; used for error messages. contentTypeDescription :: Content -> String contentTypeDescription = \case ContentBlocks {} -> "list of Block items" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-lua-marshal-0.2.6/test/test-block.lua new/pandoc-lua-marshal-0.2.7/test/test-block.lua --- old/pandoc-lua-marshal-0.2.6/test/test-block.lua 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-lua-marshal-0.2.7/test/test-block.lua 2001-09-09 03:46:40.000000000 +0200 @@ -9,7 +9,7 @@ group 'BlockQuote' { test('access content via property `content`', function () local elem = BlockQuote{'word'} - assert.are_same(elem.content, {Plain 'word'}) + assert.are_equal(elem.content, Blocks{Plain 'word'}) assert.are_equal(type(elem.content), 'table') elem.content = { @@ -29,16 +29,47 @@ test('access items via property `content`', function () local para = Para 'one' local blist = BulletList{{para}} - assert.are_same({{para}}, blist.content) + assert.are_equal(List{Blocks{para}}, blist.content) + end), + test('property `content` is a list of Block lists', function () + local items = List{Blocks{Plain 'item 1'}, Blocks{Plain 'item 2'}} + local blist = BulletList{} + blist.content = items + assert.are_equal(items, blist:clone().content) end), test('property `content` uses fuzzy marshalling', function () - local old = Plain 'old' local new = Plain 'new' - local blist = BulletList{{old}} + local blist = BulletList{{Plain 'old'}} blist.content = {{new}} - assert.are_same({{new}}, blist:clone().content) + assert.are_equal(List{Blocks{new}}, blist:clone().content) blist.content = new - assert.are_same({{new}}, blist:clone().content) + assert.are_equal(List{Blocks{new}}, blist:clone().content) + end), + test('property `content` prioritizes lists', function () + local blist = BulletList{} + local one, two = Para 'one', Plain 'two' + blist.content = {one, two} + assert.are_equal( + List{Blocks{one}, Blocks{two}}, + blist:clone().content + ) + end), + test('behavior is consistent with constructor', function () + local content = {Para 'one', CodeBlock 'print "Hello"'} + local bl1 = BulletList(content) + local bl2 = BulletList{} + bl2.content = content + assert.are_equal(bl1, bl2) + end), + test('mixing types works', function () + local one = Plain 'one' + local two = 'two' + local blist = BulletList{} + blist.content = {one, two} + assert.are_same( + List{Blocks{one}, Blocks{Plain(two)}}, + blist:clone().content + ) end), }, group 'CodeBlock' {