@@ -1063,6 +1063,19 @@ Lua functions for pandoc scripts.
1063 -- the above is equivallent to
1063 -- the above is equivallent to
1064 -- return {{Str = Str}}
1064 -- return {{Str = Str}}
1066+[`sha1 (contents)`]{#mediabag-sha1}
1068+: Returns the SHA1 has of the contents.
1072+ - SHA1 hash of the contents.
1076+ local fp = pandoc.mediabag.sha1("foobar")
1066# Submodule mediabag
1079# Submodule mediabag
1068The submodule `mediabag` allows accessing pandoc's media
1081The submodule `mediabag` allows accessing pandoc's media
@@ -1130,18 +1143,6 @@ storage. The "media bag" is used when pandoc is called with the
1130 local filename = "media/diagram.png"
1143 local filename = "media/diagram.png"
1131 local mt, contents = pandoc.mediabag.lookup(filename)
1144 local mt, contents = pandoc.mediabag.lookup(filename)
1133−[`sha1 (contents)`]{#mediabag-sha1}
1135−: Returns the SHA1 has of the contents.
1139− - SHA1 hash of the contents.
1143− local fp = pandoc.mediabag.sha1("foobar")
1145[`fetch (source, base_url)`]{#mediabag-fetch}
1146[`fetch (source, base_url)`]{#mediabag-fetch}
1147: Fetches the given source from a URL or local file.
1148: Fetches the given source from a URL or local file.