From 8768f7e5b060b4024d88d12f4255d515dd4ca7fa Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 30 Sep 2017 23:15:43 -0700 Subject: Lua: use sha1 instead of hashname. Better to leave control over the extension to the user. --- doc/lua-filters.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/lua-filters.md b/doc/lua-filters.md index c6e1814b4..8bff62c21 100644 --- a/doc/lua-filters.md +++ b/doc/lua-filters.md @@ -1130,18 +1130,17 @@ storage. The "media bag" is used when pandoc is called with the local filename = "media/diagram.png" local mt, contents = pandoc.mediabag.lookup(filename) -[`hashname (mime_type, contents)`]{#mediabag-hashname} +[`sha1 (contents)`]{#mediabag-sha1} -: Returns a filename with a basename based on the SHA1 has of the - contents and an extension based on the mime type. +: Returns the SHA1 has of the contents. Returns: - - Filename based on SHA1 hash. + - SHA1 hash of the contents. Usage: - local fp = pandoc.mediabag.hashname("plain/text", "foobar") + local fp = pandoc.mediabag.sha1("foobar") [`fetch (source, base_url)`]{#mediabag-fetch} -- cgit v1.2.3