aboutsummaryrefslogtreecommitdiff
path: root/pandoc.cabal
AgeCommit message (Collapse)AuthorFilesLines
2019-12-08Use external emojis package.John MacFarlane1-5/+2
Moved the emoji-specified code into an external package we can depend on.
2019-12-07Use doctemplates 0.8.John MacFarlane1-2/+2
2019-12-05Bump to 2.8.1John MacFarlane1-1/+1
2019-12-03Move data/emoji.json to emoji.json, add to extra-source-files.John MacFarlane1-0/+2
This doesn't really belong in data-files as it's not loaded dynamically.
2019-11-27Generate Emoji module with TH.John MacFarlane1-1/+3
- Add Text.Pandoc.Emoji.TH. - Replace long literal list in Text.Pandoc.Emoji with one-liner generating it from data/emoji.json using TH. - Add Makefile target to download data/emoji.json. - Remove tools/emoji.hs.
2019-11-26Bump to 2.8.0.1 and update changelog and manual.John MacFarlane1-1/+1
2019-11-26Use skylighting 0.8.3.John MacFarlane1-2/+2
2019-11-24Add unexported Text.Pandoc.Readers.Metadata.John MacFarlane1-0/+1
For YAML metadata parsing. A step in the direction of #5914. No API change.
2019-11-24Update to doctemplates 0.7.2, update template docs.John MacFarlane1-2/+2
This adds the `nowrap` filter.
2019-11-18Use doctemplates 0.7.1John MacFarlane1-2/+2
2019-11-14Fixed some test locations and put test data files in extra-source-files.John MacFarlane1-0/+6
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc1-3/+3
PR #5884. + Use pandoc-types 1.20 and texmath 0.12. + Text is now used instead of String, with a few exceptions. + In the MediaBag module, some of the types using Strings were switched to use FilePath instead (not Text). + In the Parsing module, new parsers `manyChar`, `many1Char`, `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`, `mantyUntilChar` have been added: these are like their unsuffixed counterparts but pack some or all of their output. + `glob` in Text.Pandoc.Class still takes String since it seems to be intended as an interface to Glob, which uses strings. It seems to be used only once in the package, in the EPUB writer, so that is not hard to change.
2019-10-30Use latest doclayout.John MacFarlane1-1/+1
Closes #5863.
2019-10-30docbook reader: fix nesting of chapters and sections (#5864)Florian Klink1-0/+1
* Set dbBook to true when traversing a chapter too. Currently, a `<title/>` in a chapter and in a `<section/>` below that chapter have the same level if they're not inside a `<book/>`. This can happen in a multi-file book project. Also see the example at https://tdg.docbook.org/tdg/4.5/chapter.html Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr> * Add docbook-chapter test This tests nested `<section/>` and makes sure `<title/>` in the first `<section/>` below `<chapter/>` is one level deeper than the `<chapter/>`'s `<title/>`, also when not inside a `<book/>`. Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr>
2019-10-29Changes to build with new doctemplates/doclayout.John MacFarlane1-2/+3
The new version of doctemplates adds many features to pandoc's templating system, while remaining backwards-compatible. New features include partials and filters. Using template filters, one can lay out data in enumerated lists and tables. Templates are now layout-sensitive: so, for example, if a text with soft line breaks is interpolated near the end of a line, the text will break and wrap naturally. This makes the templating system much more suitable for programatically generating markdown or other plain-text files from metadata.
2019-10-14Minor template & test changes for latest dev doctemplates.John MacFarlane1-2/+2
2019-10-10Improve parsing of --defaults.John MacFarlane1-1/+0
- Add FromYAML instances to Opt and to all subsidiary types. - Remove the use of HsYAML-aeson, which doesn't give good position information on errors. - Rename some fields in Opt to better match cli options or reflect what the ycontain [API change]: + optMetadataFile -> optMetadataFiles + optPDFEngineArgs -> optPDFEngineOpts + optWrapText -> optWrap - Add IpynbOutput enumerated type to Text.Pandoc.App.Opts. Use this instead fo a string for optIpynbOutput. - Add FromYAML instance for Filter in Text.Pandoc.Filters. With these changes parsing of defaults files should be complete and should give decent error messages. Now (unlike before) we get an error if an unknown field is used.
2019-10-09Add HsYAML-aeson to build-dependsJohn MacFarlane1-0/+1
2019-10-09Options.WriterOptions: Change type of writerVariables to Context Text.John MacFarlane1-0/+2
This will allow structured values. [API change]
2019-10-07Remove derive_json_via_th flag; always use TH.John MacFarlane1-9/+1
This cuts down on code duplication and reduces the chance for errors. See #4083.
2019-10-07Make derive_json_via_th flag false by defaultJohn MacFarlane1-1/+1
2019-10-04Require haddock-library >= 1.8John MacFarlane1-1/+1
2019-10-03Use texmath 0.11.3John MacFarlane1-1/+1
2019-10-03Don't use -Wnoncanonical-monadfail-instances which is deprecated in ghc 8.8.John MacFarlane1-6/+0
2019-10-03Allow latest haddock-library.John MacFarlane1-1/+1
2019-10-03Use latest skylighting.John MacFarlane1-2/+2
2019-09-30Use skylighting >= 0.8.2.2.John MacFarlane1-2/+2
2019-09-28Markdownify changelog -> changelog.md.John MacFarlane1-1/+1
2019-09-27Require doctemplates 0.6.1.John MacFarlane1-1/+1
2019-09-25Use latest skylighting.John MacFarlane1-2/+2
This addresses #5776 for now, though ultimately we need a new release of regex-pcre-builtin or some other solution.
2019-09-24Use latest texmath.John MacFarlane1-1/+1
2019-09-24Allow latest Diff.John MacFarlane1-1/+1
2019-09-23pandoc.cabal: repeat ghc-options in all stanzas.John MacFarlane1-4/+63
2019-09-22Require latest texmath.John MacFarlane1-1/+1
2019-09-22[Docx Writer] Re-use Readers.Docx.Parse for StyleMap (#5766)Nikolay Yakimov1-1/+2
* [Docx Parser] Move style-parsing-specific code to a new module * [Docx Writer] Re-use Readers.Docx.Parse.Styles for StyleMap * [Docx Writer] Move Readers.Docx.StyleMap to Writers.Docx.StyleMap It's never used outside of writer code, so it makes more sense to scope it under writers really.
2019-09-22Use HsYAML-0.2.0.0John MacFarlane1-1/+1
Most of this is due to @vijayphoenix (#5704), but it needed some revisions to integrate with current master, and to use the released HsYAML. Closes #5704.
2019-09-08Add to other-extensions field for use by cabal solver (#5728)Vanessa McHale1-0/+1
2019-09-05Add dependency on skylighting-core in cabal file.John MacFarlane1-0/+1
Closes #5729.
2019-09-05Small cleanups in Makefile.John MacFarlane1-0/+4
2019-09-05Add partial styles.html in HTML5 template.John MacFarlane1-0/+1
Avoid duplication in HTML templates by using styles.html partial. Change indentation of styles in template.
2019-09-02Use doctemplates 0.6.John MacFarlane1-1/+1
2019-08-26Cabal cleanup (#5693)Albert Krewinkel1-22/+9
* pandoc.cabal: remove conditionals for ghc < 8.0. Support for GHC 7.10 has been dropped. * pandoc.cabal: compile with `-Wcpp-undef` when possible * pandoc.cabal: compile with `-fhide-source-paths` if possible
2019-08-25Use new doctemplates, doclayout.John MacFarlane1-2/+2
+ Remove Text.Pandoc.Pretty; use doclayout instead. [API change] + Text.Pandoc.Writers.Shared: remove metaToJSON, metaToJSON' [API change]. + Text.Pandoc.Writers.Shared: modify `addVariablesToContext`, `defField`, `setField`, `getField`, `resetField` to work with Context rather than JSON values. [API change] + Text.Pandoc.Writers.Shared: export new function `endsWithPlain` [API change]. + Use new templates and doclayout in writers. + Use Doc-based templates in all writers. + Adjust three tests for minor template rendering differences. + Added indentation to body in docbook4, docbook5 templates. The main impact of this change is better reflowing of content interpolated into templates. Previously, interpolated variables were rendered independently and intepolated as strings, which could lead to overly long lines. Now the templates interpolated as Doc values which may include breaking spaces, and reflowing occurs after template interpolation rather than before.
2019-08-24Change optMetadataFile type from Maybe to List (#5702)Owen McGrath1-0/+2
Changed optMetadataFile from `Maybe FilePath` to `[FilePath]`. This allows for multiple YAML metadata files to be added. The new default value has been changed from `Nothing` to `[]`. To account for this change in `Text.Pandoc.App`, `metaDataFromFile` now operates on two `mapM` calls (for `readFileLazy` and `yamlToMeta`) and a fold. Added a test (command/5700.md) which tests this functionality and updated MANUAL.txt, as per the contributing guidelines. With the current behavior, using `foldr1 (<>)`, values within files specified first will be used over those in later files. (If the reverse of this behavior would be preferred, it should be fixed by changing foldr1 to foldl1.)
2019-08-23Require pandoc-types 1.17.6.John MacFarlane1-2/+2
2019-08-16Lua: add module for AST element sequence traversalAlbert Krewinkel1-0/+1
Lua filters must be able to traverse sequences of AST elements and to replace elements by splicing sequences back in their place. Special `Walkable` instances can be used for this; those are provided in a new module `Text.Pandoc.Lua.Walk`.
2019-08-15pandoc.cabal: add cabal.project to extra-source-files.Albert Krewinkel1-1/+2
2019-08-05Version bump to 2.8 because of type changes for templates.John MacFarlane1-1/+1
2019-07-28Use doctemplates 0.3, change type of writerTemplate.John MacFarlane1-1/+2
* Require recent doctemplates. It is more flexible and supports partials. * Changed type of writerTemplate to Maybe Template instead of Maybe String. * Remove code from the LaTeX, Docbook, and JATS writers that looked in the template for strings to determine whether it is a book or an article, or whether csquotes is used. This was always kludgy and unreliable. To use csquotes for LaTeX, set `csquotes` in your variables or metadata. It is no longer sufficient to put `\usepackage{csquotes}` in your template or header includes. To specify a book style, use the `documentclass` variable or `--top-level-division`. * Change template code to use new API for doctemplates.
2019-07-23Templates: Change type of renderTemplate'.John MacFarlane1-1/+1
Return value is now Text rather than being polymorphic. This makes room for upcoming removal of the TemplateTarget class from doctemplates. Other code modified accordingly, and should compile with both current and upcoming version of doctemplates.