pandoc/test/Tests
John MacFarlane 8511f6fdf6 MediaBag improvements.
In the current dev version, we will sometimes add
a version of an image with a hashed name, keeping
the original version with the original name, which
would leave to undesirable duplication.

This change separates the media's filename from the
media's canonical name (which is the path of the link
in the document itself).  Filenames are based on SHA1
hashes and assigned automatically.

In Text.Pandoc.MediaBag:

- Export MediaItem type [API change].
- Change MediaBag type to a map from Text to MediaItem [API change].
- `lookupMedia` now returns a `MediaItem` [API change].
- Change `insertMedia` so it sets the `mediaPath` to
  a filename based on the SHA1 hash of the contents.
  This will be used when contents are extracted.

In Text.Pandoc.Class.PandocMonad:

- Remove `fetchMediaResource` [API change].

Lua MediaBag module has been changed minimally. In the future
it would be better, probably, to give Lua access to the full
MediaItem type.
2021-05-24 09:20:44 -07:00
..
Lua Lua: add module "pandoc.path" 2021-02-02 21:04:30 -08:00
Readers MediaBag improvements. 2021-05-24 09:20:44 -07:00
Writers Jira writer: use {color} when span has a color attribute 2021-05-24 09:56:02 +02:00
Command.hs Tests: Use getExecutablePath from base... 2021-03-19 23:35:47 -07:00
Helpers.hs Tests: factor out setupEnvironment in Test.Helpers. 2021-03-19 21:17:13 -07:00
Lua.hs Avoid unnecessary use of NoImplicitPrelude pragma (#7089) 2021-02-07 10:02:35 -08:00
Old.hs Tests: Use getExecutablePath from base... 2021-03-19 23:35:47 -07:00
Shared.hs Avoid unnecessary use of NoImplicitPrelude pragma (#7089) 2021-02-07 10:02:35 -08:00