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 /test/Tests | |
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 'test/Tests')
-rw-r--r-- | test/Tests/Readers/Muse.hs | 6 | ||||
-rw-r--r-- | test/Tests/Readers/Txt2Tags.hs | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index f89c58d3f..158f5788e 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -13,10 +13,8 @@ import Text.Pandoc.Class muse :: Text -> Pandoc muse = purely $ \s -> do - putCommonState - def { stInputFiles = Just ["in"] - , stOutputFile = Just "out" - } + setInputFiles ["in"] + setOutputFile (Just "out") readMuse def s infix 4 =: diff --git a/test/Tests/Readers/Txt2Tags.hs b/test/Tests/Readers/Txt2Tags.hs index 580815279..041918e70 100644 --- a/test/Tests/Readers/Txt2Tags.hs +++ b/test/Tests/Readers/Txt2Tags.hs @@ -14,10 +14,8 @@ import Text.Pandoc.Class t2t :: Text -> Pandoc -- t2t = handleError . readTxt2Tags (T2TMeta "date" "mtime" "in" "out") def t2t = purely $ \s -> do - putCommonState - def { stInputFiles = Just ["in"] - , stOutputFile = Just "out" - } + setInputFiles ["in"] + setOutputFile (Just "out") readTxt2Tags def s infix 4 =: |