summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class.hs
Commit message (Collapse)AuthorAge
* hlint code improvements.John MacFarlane2018-01-19
|
* Class: make FileTree opaque.John MacFarlane2017-12-28
| | | | | | This forces uses to interact with it using `insertInFileTree` and `getFileInfo`, which normalize file names.
* Powerpoint writer tests: use IO.John MacFarlane2017-12-28
| | | | | Otherwise we can't find the data files when compiled with -embed_data_files.
* Moved makeCanoncial definition out of ifdef!John MacFarlane2017-12-28
| | | | | Also added slide2 to the default pptx, and reordered the data files in pandoc.cabal.
* Class: use makeCanonical for normalization in FileTree and data files.John MacFarlane2017-12-28
|
* Text.Pandoc.Class: add insertInFileTree (API change).John MacFarlane2017-12-28
| | | | | | | This gives a pure way to insert an ersatz file into a FileTree. In addition, we normalize paths both on insertion and on lookup, so that "foo" and "./foo" will be judged equivalent.
* Removed whitespace at ends of line.John MacFarlane2017-12-13
|
* Add necessary powerpoint functions to Class.Jesse Rosenthal2017-12-11
|
* Export all of Text.Pandoc.Class from Text.Pandoc.John MacFarlane2017-10-29
|
* Source code reformatting.John MacFarlane2017-10-29
|
* hlint suggestions.John MacFarlane2017-10-27
|
* hlint suggestions.John MacFarlane2017-10-27
|
* Comment reformat.John MacFarlane2017-10-26
|
* Added some haddock docs for Text.Pandoc.Class functions.John MacFarlane2017-10-24
|
* Back to using [WARNING] and [INFO] to mark messages.John MacFarlane2017-10-23
|
* More pleasing presentation of warnings and info messages.John MacFarlane2017-10-23
| | | | | !! warning -- info
* Remove openURL from Shared (API change).John MacFarlane2017-10-15
| | | | | | | | Now all the guts of openURL have been put into openURL from Class. openURL is now sensitive to stRequestHeaders in CommonState and will add these custom headers when making a request. It no longer looks at the USER_AGENT environment variable, since you can now set the `User-Agent` header directly.
* Class: add stRequestHeaders to CommonState, and setRequestHeader.John MacFarlane2017-10-15
|
* Text.Pandoc.Class - add getVerbosity.John MacFarlane2017-09-30
|
* Removed writerSourceURL, add source URL to common state.John MacFarlane2017-09-30
| | | | | | | | | | | | | | | | | | 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`.
* Text.Pandoc.Lua: add mediabag submoduleAlbert Krewinkel2017-09-30
|
* Protect OVERLAPS pragma with CPP.John MacFarlane2017-08-20
|
* Use OverlappingInstances instead of OVERLAPS for ghc 7.8.4.John MacFarlane2017-08-20
|
* Removed redundant import.John MacFarlane2017-08-20
|
* Simplify instances in Class by parameterizing on MonadTrans.John MacFarlane2017-08-19
|
* Improved error report on loading translation file.John MacFarlane2017-08-12
|
* Change to yaml for translation files.John MacFarlane2017-08-12
|
* Fixed import.John MacFarlane2017-08-11
|
* More redundant imports.John MacFarlane2017-08-11
|
* Avoid some warnings when compiled wo/ embed_data_files flag.John MacFarlane2017-08-11
|
* Add getFileName to PandocMonad.John MacFarlane2017-08-11
| | | | We need this for getDefaultDataFile.
* Added support for translations (localization) (see #3559).John MacFarlane2017-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | * readDataFile, readDefaultDataFile, getReferenceDocx, getReferenceODT have been removed from Shared and moved into Class. They are now defined in terms of PandocMonad primitives, rather than being primitve methods of the class. * toLang has been moved from BCP47 to Class. * NoTranslation and CouldNotLoudTranslations have been added to LogMessage. * New module, Text.Pandoc.Translations, exporting Term, Translations, readTranslations. * New functions in Class: translateTerm, setTranslations. Note that nothing is loaded from data files until translateTerm is used; setTranslation just sets the language to be used. * Added two translation data files in data/translations. * LaTeX reader: Support `\setmainlanguage` or `\setdefaultlanguage` (polyglossia) and `\figurename`.
* Removed datadir param from readDataFile and getDefaultTemplate.John MacFarlane2017-08-10
| | | | | In Text.Pandoc.Class and Text.Pandoc.Template, resp. We now get the datadir from CommonState.
* Class: add setUserDataDir and getUserDataDir.John MacFarlane2017-08-10
| | | | | | * Add stUserDataDir to CommonState. * Rename stUserDataDir/stCabalDataDir in PureState to stUserDataFiles/stCabalDataFiles.
* Expose getDefaultDataFile in both Shared and Class.John MacFarlane2017-08-10
|
* Class: more haddocks.John MacFarlane2017-07-30
|
* Class: Removed unnecessary withMedia, improved haddocks.John MacFarlane2017-07-30
|
* Class: started adding haddocks.John MacFarlane2017-07-19
|
* Don't rely on listDirectory, which is only in newer versions...John MacFarlane2017-07-15
| | | | of directory.
* Class: make addToFileTree handle directories recursively.John MacFarlane2017-07-14
|
* Class: remove stFontFiles in PureState, 'glob' searches stFiles.John MacFarlane2017-07-14
|
* Class: added addToFileTreeJohn MacFarlane2017-07-14
|
* Tracing: give less misleading line information with parseWithString.John MacFarlane2017-06-19
| | | | | | Previously positions would be reported past the end of the chunk. We now reset the source position within the chunk and report positions "in chunk."
* Separated tracing from logging.John MacFarlane2017-06-19
| | | | | | | | | | | Formerly tracing was just log messages with a DEBUG log level. We now make these things independent. Tracing can be turned on or off in PandocMonad using `setTrace`; it is independent of logging. * Removed `DEBUG` from `Verbosity`. * Removed `ParserTrace` from `LogMessage`. * Added `trace`, `setTrace` to `PandocMonad`.
* Use Control.Monad.State.Strict throughout.John MacFarlane2017-06-17
| | | | | This gives 20-30% speedup and reduction of memory usage in most of the writers.
* Changed "extracting..." warning to a regular log message.John MacFarlane2017-06-12
| | | | | | | | | | | | 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.
* hlint suggestions.John MacFarlane2017-06-02
|
* Some hlint refactoring.John MacFarlane2017-06-01
|
* Trivial reformatting.John MacFarlane2017-06-01
|
* Don't double extract images from docx.John MacFarlane2017-05-18
| | | | | | | | | | | This fixes a regression that was introduced when `--extract-media` was generalized to work with any input format. We were getting two versions of each image extracted from a docx, one with a hash, one with the original filename, though only the hash one was used. This patch restores the original behavior (using the original filename). Pointed out in comments on #3674. Thanks to @laperouse.