aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/MediaBag.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-05-29pandoc.mediabag module: add function `delete`Albert Krewinkel1-0/+9
Function `pandoc.mediabag.delete` allows to remove a single item of the given name from the media bag.
2019-05-29pandoc.mediabag module: add items function iterating over mediabagAlbert Krewinkel1-0/+6
A new function `pandoc.mediabag.items` was added to Lua module pandoc.mediabag. This allows users to lazily iterate over all media bag items, loading items into Lua one-by-one. Example: for filename, mime_type, content in pandoc.mediabag.items() do -- use media bag item. end This is a convenient alternative to using `mediabag.list` in combination with `mediabag.lookup`.
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-16Monoid/Semiground cleanup relying on custom Prelude.John MacFarlane1-4/+0
2018-03-16Semigroup instance for MediaBag with base >= 4.9.John MacFarlane1-0/+5
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-10-27hlint changes.John MacFarlane1-1/+1
2017-07-13Use foldrWithKey instead of deprecated foldWithKey.John MacFarlane1-1/+1
2017-06-12Changed "extracting..." warning to a regular log message.John MacFarlane1-31/+0
This makes it sensitive to proper verbosity settings. (It is now treated as INFO rather than WARNING, so one doesn't get these messages for creation of tmp images while making a pdf.) API changes: * Removed extractMediaBag from Text.Pandoc.MediaBag. * Added Extracting as constructor for LogMessage.
2017-05-13Update dates in copyright noticesAlbert Krewinkel1-2/+2
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-12/+13
2017-01-25MediaBag: put extractMediaBag into MonadIO.John MacFarlane1-3/+7
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane1-0/+1
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane1-1/+0
- The (non-exported) prelude is in prelude/Prelude.hs. - It exports Monoid and Applicative, like base 4.8 prelude, but works with older base versions. - It exports (<>) for mappend. - It hides 'catch' on older base versions. This allows us to remove many imports of Data.Monoid and Control.Applicative, and remove Text.Pandoc.Compat.Monoid. It should allow us to use -Wall again for ghc 7.10.
2015-09-26Removed unneeded imports.John MacFarlane1-1/+0
2015-09-26MediaBag: ensure that / is always used as path separator.John MacFarlane1-4/+6
2015-03-19Derive from Data and Typeable for libpandocShahbaz Youssefi1-2/+4
This commit derives a few types from Data and Typeable used by libpandoc. Requires corresponding pull-request for Highlighting-Kate: https://github.com/jgm/highlighting-kate/pull/64 Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
2014-09-25MediaBag: Fixes Windows specific path problemsmpickering1-5/+5
Changes the internal representation to fix the problem. I haven't tested this on windows. Closes #1597
2014-08-17Remove an unnecessary import.Artyom Kazak1-1/+1
2014-08-17MIME cleanup.Artyom Kazak1-10/+10
* Create a type synonym for MIME type (instead of `String`). * Add `getMimeTypeDef` function. * Avoid recreating MIME type `Map`s every time. * Move “Formula-...” case handling into `getMimeType`.
2014-08-05MediaBag: Improved normalisation when writing filesMatthew Pickering1-1/+1
2014-07-31New module, Text.Pandoc.MediaBag.John MacFarlane1-0/+107
Moved `MediaBag` definition and functions from Shared: `lookupMedia`, `mediaDirectory`, `insertMedia`, `extractMediaBag`. Removed `emptyMediaBag`; use `mempty` instead, since `MediaBag` is a Monoid.