Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-pandoc-lua-engine for openSUSE:Factory checked in at 2025-06-04 20:29:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-pandoc-lua-engine (Old) and /work/SRC/openSUSE:Factory/.ghc-pandoc-lua-engine.new.16005 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-pandoc-lua-engine" Wed Jun 4 20:29:45 2025 rev:15 rq:1282756 version:0.4.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-pandoc-lua-engine/ghc-pandoc-lua-engine.changes 2025-05-22 16:57:50.748399256 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-pandoc-lua-engine.new.16005/ghc-pandoc-lua-engine.changes 2025-06-04 20:29:57.456473876 +0200 @@ -1,0 +2,6 @@ +Thu May 29 07:13:36 UTC 2025 - Peter Simons <psim...@suse.com> + +- Update pandoc-lua-engine to version 0.4.3. + Upstream does not provide a change log file. + +------------------------------------------------------------------- Old: ---- pandoc-lua-engine-0.4.2.tar.gz New: ---- pandoc-lua-engine-0.4.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-pandoc-lua-engine.spec ++++++ --- /var/tmp/diff_new_pack.urQDrB/_old 2025-06-04 20:29:58.144502405 +0200 +++ /var/tmp/diff_new_pack.urQDrB/_new 2025-06-04 20:29:58.144502405 +0200 @@ -20,7 +20,7 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.4.2 +Version: 0.4.3 Release: 0 Summary: Lua engine to power custom pandoc conversions License: GPL-2.0-or-later ++++++ pandoc-lua-engine-0.4.2.tar.gz -> pandoc-lua-engine-0.4.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-lua-engine-0.4.2/pandoc-lua-engine.cabal new/pandoc-lua-engine-0.4.3/pandoc-lua-engine.cabal --- old/pandoc-lua-engine-0.4.2/pandoc-lua-engine.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-lua-engine-0.4.3/pandoc-lua-engine.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ cabal-version: 2.4 name: pandoc-lua-engine -version: 0.4.2 +version: 0.4.3 build-type: Simple license: GPL-2.0-or-later license-file: COPYING.md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-lua-engine-0.4.2/src/Text/Pandoc/Lua/Module/MediaBag.hs new/pandoc-lua-engine-0.4.3/src/Text/Pandoc/Lua/Module/MediaBag.hs --- old/pandoc-lua-engine-0.4.2/src/Text/Pandoc/Lua/Module/MediaBag.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-lua-engine-0.4.3/src/Text/Pandoc/Lua/Module/MediaBag.hs 2001-09-09 03:46:40.000000000 +0200 @@ -27,6 +27,7 @@ import Text.Pandoc.Lua.Orphans () import Text.Pandoc.Lua.PandocLua (unPandocLua) import Text.Pandoc.MIME (MimeType) +import Text.Pandoc.SelfContained (makeDataURI) import qualified Data.ByteString.Lazy as BL import qualified Data.Text as T @@ -60,6 +61,7 @@ , items `since` makeVersion [2,7,3] , list `since` makeVersion [2,0] , lookup `since` makeVersion [2,0] + , make_data_uri `since` makeVersion [3,7,1] , write `since` makeVersion [3,0] ] , moduleOperations = [] @@ -243,6 +245,29 @@ , " local mt, contents = pandoc.mediabag.fetch(diagram_url)" ] +make_data_uri :: DocumentedFunction PandocError +make_data_uri = defun "make_data_uri" + ### (\mime raw -> pure $ makeDataURI (mime, raw)) + <#> parameter Lua.peekText "string" "mime_type" "MIME type of the data" + <#> parameter Lua.peekByteString "string" "raw_data" "data to encode" + =#> functionResult Lua.pushText "string" "data uri" + #? T.unlines + [ "Convert the input data into a data URI as defined by RFC 2397." + , "" + , "Example:" + , "" + , " -- Embed an unofficial pandoc logo" + , " local pandoc_logo_url = 'https://raw.githubusercontent.com/'" + , " .. 'tarleb/pandoc-logo/main/pandoc.svg'" + , "" + , " local datauri = pandoc.mediabag.make_data_uri(" + , " pandoc.mediabag.fetch(pandoc_logo_url)" + , " )" + , "" + , " local image = pandoc.Image('Logo', datauri)" + ] + + -- | Extract the mediabag or just a single entry. write :: DocumentedFunction PandocError write = defun "write" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-lua-engine-0.4.2/src/Text/Pandoc/Lua/Module/Pandoc.hs new/pandoc-lua-engine-0.4.3/src/Text/Pandoc/Lua/Module/Pandoc.hs --- old/pandoc-lua-engine-0.4.2/src/Text/Pandoc/Lua/Module/Pandoc.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-lua-engine-0.4.3/src/Text/Pandoc/Lua/Module/Pandoc.hs 2001-09-09 03:46:40.000000000 +0200 @@ -25,6 +25,7 @@ import Data.Maybe (fromMaybe) import Data.Proxy (Proxy (Proxy)) import Data.Text.Encoding.Error (UnicodeException) +import Data.Version (makeVersion) import HsLua import System.Exit (ExitCode (..)) import Text.Pandoc.Class ( PandocMonad, FileInfo (..), FileTree @@ -151,7 +152,7 @@ otherConstructors :: [DocumentedFunction PandocError] otherConstructors = [ mkAttr - , mkCaption + , mkCaption `since` makeVersion [3,6,1] , mkCell , mkAttributeList , mkCitation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-lua-engine-0.4.2/test/lua/module/pandoc-mediabag.lua new/pandoc-lua-engine-0.4.3/test/lua/module/pandoc-mediabag.lua --- old/pandoc-lua-engine-0.4.2/test/lua/module/pandoc-mediabag.lua 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-lua-engine-0.4.3/test/lua/module/pandoc-mediabag.lua 2001-09-09 03:46:40.000000000 +0200 @@ -104,4 +104,15 @@ end), }, + group 'make_data_uri' { + test('returns a data URI', function () + local uri = mediabag.make_data_uri('text/plain', 'foo') + assert.are_equal(uri:sub(1,5), 'data:') + end), + test('URI specifies the given MIME type', function () + local mimetype = 'text/plain' + local uri = mediabag.make_data_uri(mimetype, 'foo') + assert.are_equal(uri:sub(6, 5 + #mimetype), mimetype) + end), + } }