diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-09-30 16:07:47 -0500 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-09-30 16:11:20 -0500 |
commit | f3a80034fff41a8b0c13519fa13bed794db1b8d2 (patch) | |
tree | 8355bd3c88b87b960171a65aad05b36e6822e8a4 /src/Text/Pandoc/Lua | |
parent | 9b7d652ab7a0f4cdd86efd92f43f1b20724e8982 (diff) | |
download | pandoc-f3a80034fff41a8b0c13519fa13bed794db1b8d2.tar.gz |
Removed writerSourceURL, add source URL to common state.
Removed `writerSourceURL` from `WriterOptions` (API change).
Added `stSourceURL` to `CommonState`.
It is set automatically by `setInputFiles`.
Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`.
The type of `getInputFiles` has changed; it now returns `[FilePath]`
instead of `Maybe [FilePath]`.
Functions in Class that formerly took the source URL as a parameter
now have one fewer parameter (`fetchItem`, `downloadOrRead`,
`setMediaResource`, `fillMediaBag`).
Removed `WriterOptions` parameter from `makeSelfContained` in
`SelfContained`.
Diffstat (limited to 'src/Text/Pandoc/Lua')
-rw-r--r-- | src/Text/Pandoc/Lua/PandocModule.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Lua/PandocModule.hs b/src/Text/Pandoc/Lua/PandocModule.hs index ffd681d30..326de1886 100644 --- a/src/Text/Pandoc/Lua/PandocModule.hs +++ b/src/Text/Pandoc/Lua/PandocModule.hs @@ -136,11 +136,9 @@ mediaDirectoryFn mbRef = do insertResource :: IORef MB.MediaBag -> String - -> OrNil String -> Lua NumResults -insertResource mbRef src sourceUrlOrNil = do - (fp, mimeType, bs) <- liftIO . runIOorExplode $ - fetchMediaResource (toMaybe sourceUrlOrNil) src +insertResource mbRef src = do + (fp, mimeType, bs) <- liftIO . runIOorExplode $ fetchMediaResource src liftIO $ print (fp, mimeType) insertMediaFn mbRef fp (OrNil mimeType) bs |