Commit graph

1104 commits

Author SHA1 Message Date
John MacFarlane
8cea6125fb Exclude foundaiton 0.0.21 for ghc 7.10. 2018-07-12 21:59:25 -07:00
John MacFarlane
2437b6d10b Attempt to fix latest ghc 7.10 build failure. 2018-07-12 21:46:37 -07:00
John MacFarlane
2737e4996c Allow criterion 1.5. 2018-07-02 23:29:37 +02:00
John MacFarlane
ce83a128e1 Use ghc 8.4.2 in travis and tested-with.
8.4.1 shipped with the wrong version of mtl, which didn't
match its documented API.
2018-06-30 10:00:28 +02:00
John MacFarlane
e49b8304e4 Use HsYAML instead of yaml for translations, YAML metadata.
yaml wraps a C library; HsYAML is pure Haskell.
Closes #4747.  Advances #4535.
2018-06-29 23:21:25 +02:00
John MacFarlane
39dc3b9a4b Require yaml < 0.8.31 for ghc < 8.0.2.
The 0.8.31 release of yaml adds a constraint to ghc versions 8.0.2
and greater.
2018-06-29 20:09:08 +02:00
John MacFarlane
06bcb7c872 Remove network-uri flag and use 'Network.Socket'.
This removes a compiler warning.
There is no need for the old network-uri flag, since
network 2.6 was released in 2014.
2018-06-28 11:51:52 +02:00
Sergei Trofimovich
dda3882348 pandoc.cabal: fix lower yaml bound up to 0.8.11 (#4727)
`prettyPrintParseException` was added to yaml-0.8.11.

Reported-by: Tom Gillespie
Bug: https://github.com/jgm/pandoc/issues/4726
Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/725
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2018-06-24 13:09:07 +02:00
John MacFarlane
adbaaeaf9b Raise lower bound for yaml library.
Closes #4726.
2018-06-23 10:46:02 +02:00
John MacFarlane
8b4728e284 Use latest pandoc-types (1.17.5). 2018-06-11 11:05:48 -07:00
John MacFarlane
158344d26d Allow aeson-1.4. 2018-06-10 10:24:12 -07:00
John MacFarlane
edcfbccf5d Use skylighting 0.7.2. Adjust tests.
This should fix commercialhaskell/stackage#3719, once
a new release is made.
2018-06-09 13:34:21 -07:00
Felix Yan
cf2d695061 Allow tasty 1.1 (#4685)
All tests pass with tasty 1.1.0.1 here.
2018-06-03 13:59:47 -07:00
John MacFarlane
d32e866449 LaTeX reader: handle includes without surrounding blanklines.
In addition, `\input` can now be used in an inline context,
e.g. to provide part of a paragraph, as it can in LaTeX.

Closes #4553.
2018-06-01 09:25:10 -07:00
John MacFarlane
3181023ca1 Add version bound in custom-setup for Cabal. 2018-05-30 15:12:42 -07:00
John MacFarlane
1e4255ced6 Require cabal-version >= 2.0. This is needed for haddock-library. 2018-05-30 13:16:16 -07:00
John MacFarlane
aff401745c Revert "ALlow compilation with haddock-library 1.4 and above."
This reverts commit 50c71b5bc5.

This was a bad idea, since tests depend on recent haddock-library.
We'd be able to build but fail tests.
2018-05-30 13:13:57 -07:00
John MacFarlane
50c71b5bc5 ALlow compilation with haddock-library 1.4 and above.
haddock-library-1.6 requires Cabal >= 2.0.  This change allows
systems with older Cabal versions to build pandoc.
2018-05-30 13:06:44 -07:00
John MacFarlane
81ed7948da Use haddock-library 1.6.0. 2018-05-20 17:05:23 -07:00
John MacFarlane
933aa3ee84 Require texmath >= 0.11.
Although pandoc compiles with 0.10, the tests assume texmath 0.11.

Closes #4651.
2018-05-14 10:07:13 -07:00
Yan Pas
b0b41cbbe6 Merge branch 'master' into groff_reader 2018-05-12 11:42:39 +03:00
John MacFarlane
ebb60075f5 Bump version to 2.2.1. 2018-05-10 21:45:29 -07:00
John MacFarlane
c3d2572c5f Use texmath-0.11. 2018-05-10 12:10:35 -07:00
Yan Pashkovsky
a337685fe0
Merge branch 'master' into groff_reader 2018-05-09 19:48:34 +03:00
John MacFarlane
1494b20bb4 Document FB2 reader. 2018-04-26 12:35:02 -07:00
Alexander
1927bc9aac Add FB2 reader (#4539) 2018-04-26 12:33:18 -07:00
John MacFarlane
16f36eee43 Removed deprecated ancient HTML math methods.
Removed `--latexmathml`, `--gladtex`, `--mimetex`, `--jsmath`, `-m`,
`--asciimathml` options.

Removed `JsMath`, `LaTeXMathML`, and `GladTeX` constructors from
`Text.Pandoc.Options.HTMLMathMethod` [API change].

Removed unneeded data file LaTeXMathML.js and updated tests.

Bumped version to 2.2.
2018-04-25 17:18:56 -07:00
Jesse Rosenthal
bb428df32b Powerpoint writer: Remove docProps/thumbnail.jpeg in data dir.
This file wasn't used in the production of documents. It's supposed to
be a thumbnail of the current document, and we can't actually produce
that ourselves. It turns out that the file contains a nonfree ICC
color calibration file, so the best thing to do would be to remove it
altogether.

Fixes: #4588
2018-04-24 16:00:15 -04:00
Francesco Occhipinti
9465e5e048 use the -threaded GHC flag when building benchmarks, related to #4130 (#4587) 2018-04-24 12:31:03 -07:00
John MacFarlane
c3d0cc9b8e Bump to 2.1.4. 2018-04-11 17:24:19 -07:00
John MacFarlane
dd4e8c4a7a Bump temporary upper bound to 1.4. 2018-04-11 09:45:17 -07:00
John MacFarlane
9dac007228 Make 'weigh-pandoc' into a benchmark program.
Remove 'weigh-pandoc' flag.  This is now built (and run)
automatically when you build (and run) benchmarks.
2018-03-18 11:52:40 -07:00
John MacFarlane
937bec95a9 Removed old-locale flag and Text.Pandoc.Compat.Time.
This is no longer necessary since we no longer support ghc 7.8.
2018-03-18 11:24:29 -07:00
John MacFarlane
daf731a001 pandoc.cabal: fix up other-extensions and language fields.
language is now consistently Haskell2010, and other-extensions
is consistently NoImplicitPrelude. Everything else to be specified
in the module header as needed.
2018-03-18 10:45:32 -07:00
John MacFarlane
82ff503210 Fix what was missing in last commit. 2018-03-18 09:47:38 -07:00
John MacFarlane
dd53545154 New approach to custom Prelude.
We use no custom Prelude with the latest ghc version (8.4.1),
so we don't have problems with ghci.

See https://ghc.haskell.org/trac/ghc/ticket/10920
https://www.reddit.com/r/haskell/comments/3ryf2p/how_can_you_use_a_custom_prelude_with_ghci/

This may help with #4464.
2018-03-18 09:20:21 -07:00
John MacFarlane
59903ec82c Bump to 2.1.3, update changelog. 2018-03-17 19:00:20 -07:00
John MacFarlane
afb72f1857 Add semigroups dependency to executables...
since custom prelude depends on it.
2018-03-17 17:10:02 -07:00
John MacFarlane
fad8d0d67f Allow earlier versions of haddock-library, use CPP. 2018-03-16 23:18:42 -07:00
John MacFarlane
c166861ee6 Require haddock-libary 1.5 (with tables). 2018-03-16 21:21:41 -07:00
John MacFarlane
424d0df1f2 Use latest pandoc-types. 2018-03-16 21:20:52 -07:00
John MacFarlane
e21b57991e Added custom prelude.
We need this again because of Monoid/Semigroup.
2018-03-16 10:21:54 -07:00
John MacFarlane
bc2f4422b2 License to GPL-2 instead of GPL.
New cabal new-build seems to choke on GPL, even though it's
supposed to be legal.
2018-03-16 08:41:26 -07:00
John MacFarlane
1ac56f99df Bump upper-bound for time, criterion, haddock-library, exceptions. 2018-03-15 23:48:19 -07:00
John MacFarlane
1b37e3b3c0 Require pandoc-types 1.17.4.
And a few tweaks related to the Semigroups/Monoid change.

Closes #4448.
2018-03-13 23:23:04 -07:00
John MacFarlane
2f979e0684 BUmp upper bound for http-types. 2018-03-11 18:01:57 -07:00
John MacFarlane
0e45cc1297 Bump aeson upper bound. 2018-03-07 13:18:09 -08:00
Chris Martin
b16d36397d pandoc.cabal: link to https version of the website (#4433) 2018-03-07 09:37:53 -08:00
Felix Yan
475f46fa7c Allow tasty-quickcheck 0.10 (#4429)
Tests pass with the new test tool.
2018-03-05 09:35:16 -08:00
John MacFarlane
7518e8e00e Allow skylighting 0.7.x. 2018-03-04 12:08:11 -08:00
John MacFarlane
554e9b80bd Bump version to 2.1.2. 2018-03-02 10:54:03 -08:00
Alexander Krotov
83ce0a789d Update tagsoup to 0.14.6 2018-02-28 07:00:14 +03:00
Albert Krewinkel
3560603f10
Set fixed minor version for hslua
The ToLuaStack instance for Set is orphaned. The PVP requires the minor
version to be fixed in this case.
2018-02-27 19:36:52 +01:00
Alexander Krotov
ab1bee58e5 Update tagsoup to 0.14.5 2018-02-27 15:02:59 +03:00
Alexander Krotov
19b4cb16f3 Update tagsoup to 0.14.4
Fixes #4282
2018-02-27 04:31:46 +03:00
Albert Krewinkel
6ed7926bb4
Org reader tests: move citation tests to separate module 2018-02-26 21:18:13 +01:00
John MacFarlane
bbca6f223f Allow exceptions 0.9. 2018-02-26 09:16:59 -08:00
John MacFarlane
6baebcbe86 Removed ghc-prof-options.
As of cabal 1.24, sensible defaults are used.
See
https://www.haskell.org/cabal/users-guide/developing-packages.html#pkg-field-ghc-prof-options.
2018-02-25 23:43:01 -08:00
Yan Pas
fd3676a568 initial 2018-02-25 03:34:17 +03:00
John MacFarlane
6b388971ea Require aeson-pretty 0.8.5. Closes #4394.
`confTrailingNewline` is introduced in this version.
2018-02-22 22:23:11 -08:00
Jesse Rosenthal
574104861f Powerpoint writer: Another attempt at avoiding compiler warnings. 2018-02-18 18:54:16 -05:00
Jesse Rosenthal
6c6ac9f22e Powerpoint writer: Move notes slides into data tree. 2018-02-18 16:31:32 -05:00
John MacFarlane
c501942866 Bump blaze-markup, blaze-html lower bounds to 0.8, 0.9.
This is needed because the type constructor Empty in MarkupM
has changed, and the HTML writer assumes the constructor has
an argument.

Closes #4334.
2018-02-01 10:08:53 -08:00
Jesse Rosenthal
a66bfd9071 Add docx golden tests to cabal file. 2018-01-27 08:09:01 -05:00
Jesse Rosenthal
61f80e795d Tests: Abstract powerpoint tests out to OOXML tests.
There is very little pptx-specific in these tests, so we abstract out
the basic testing function so it can be used for docx as well. This
should allow us to catch some errors in the docx writer that slipped
by the roundtrip testing.
2018-01-25 15:29:50 -05:00
John MacFarlane
4423f81079 Require tagsoup 0.14.3 - closes #4282.
This fixes an HTML tokenization bug whereby comments
were sometimes consumed with open tags.
2018-01-21 10:09:27 -08:00
Jesse Rosenthal
54526525bf Powerpoint writer tests: New test framework for pptx.
Previously we had tested certain properties of the output PowerPoint
slides. Corruption, though, comes as the result of a numebr of
interrelated issues in the output pptx archive. This is a new
approach, which compares the output of the Powerpoint writer with
files that we know to (a) not be corrupt, and (b) to show the desired
output behavior (details below). This commit introduces three tests
using the new framework. More will follow.

The test procedure: given a native file and a pptx file, we generate a
pptx archive from the native file, and then test:

1. Whether the same files are in the two archives

2. Whether each of the contained xml files is the same. (We skip time
   entries in `docProps/core.xml`, since these are derived from IO. We
   just check to make sure that they're there in the same way in both
   files.)

3. Whether each of the media files is the same.

Note that steps 2 and 3, though they compare multiple files, are one
test each, since the number of files depends on the input file (if
there is a failure, it will only report the first failed file
comparison in the test failure).
2018-01-21 12:15:35 -05:00
John MacFarlane
63b10cf157 More stack.yaml fixes for skylighting. 2018-01-18 10:05:41 -08:00
John MacFarlane
e04d648594 Require latest skylighting. 2018-01-18 09:27:00 -08:00
John MacFarlane
1bc2186425 Version to 2.1.1. 2018-01-17 10:21:02 -08:00
Jesse Rosenthal
ae8c0cdba8 Docx reader: Parse instrText info in fldChar tags.
We introduce a new module, Text.Pandoc.Readers.Docx.Fields which
contains a simple parsec parser. At the moment, only simple hyperlink
fields are accepted, but that can be extended in the future.
2018-01-16 13:22:02 -05:00
John MacFarlane
4b7bc40e8b Renaming: Json -> JSON in modules and functions. 2018-01-15 10:46:40 -08:00
John MacFarlane
f114153481
Merge pull request #4227 from tarleb/lua-run-json-filter
Run JSON filters from Lua filters
2018-01-15 11:43:46 -07:00
John MacFarlane
0e16155aaf Remove custom prelude and ghc 7.8 support. 2018-01-14 23:31:49 -08:00
John MacFarlane
2cd5b55d51 Fix cabal to use base-compat with ghc < 7.10. 2018-01-14 22:50:46 -08:00
John MacFarlane
2c00540485 Use base-compat for our custom prelude.
This should give us more complete coverage of newer
base features.

See #4255.
2018-01-14 18:34:26 -08:00
John MacFarlane
cd80b8d76f Allow latest QuickCheck. 2018-01-14 12:24:21 -08:00
Jesse Rosenthal
431f6166fa Powerpoint writer: Refactor into separate modules.
There are two steps in the conversion: a conversion from pandoc to a
Presentation datatype modeling pptx, and a conversion from
Presentation to a pptx archive. The two steps were sharing the same
state and environment, and the code was getting a bit
spaghetti-ish. This separates the conversion into separate
modules (T.P.W.Powerpoint.Presentation, which defineds the
Presentation datatype and goes Pandoc->Presentation)
and (T.P.W.Pandoc.Output, which goes Presentation->Archive).
Text.Pandoc.Writers.Powerpoint a thin wrapper around the two modules.
2018-01-14 09:39:39 -05:00
Albert Krewinkel
5d49cbd35e
Move filter functions to separate module 2018-01-13 00:05:11 +01:00
Albert Krewinkel
6528082401
Lua filters: improve error messages
Provide more context about the task which caused an error.
2018-01-12 21:28:27 +01:00
John MacFarlane
87e16563f4 Bump criterion upper bound. 2018-01-09 14:58:51 -08:00
John MacFarlane
1d8f2edff0 Allow tasty 1.0. 2018-01-08 17:08:46 -08:00
John MacFarlane
ae6ba1533b Use latest skylighting and omit the 'missingincludes' check.
If you use a custom syntax definition that refers to a syntax
you haven't loaded, pandoc will now complain when it is highlighting
the text, rather than at the start.

This saves a huge performance hit from the `missingIncludes` check.

Closes #4226.
2018-01-07 19:24:08 -08:00
Albert Krewinkel
0d935bd081
Update copyright notices to include 2018 2018-01-05 20:39:12 +01:00
Albert Krewinkel
bdb911550c
Bump hslua version to 0.9.5
This version fixes a bug that made it difficult to handle failures while
getting lists or a Map from Lua. A bug in pandoc, which made it
necessary to always pass a tag when using MetaList or MetaBlock, is
fixed as a result. Using the pandoc module's constructor functions for
these values is now optional (if still recommended).
2018-01-04 23:15:28 +01:00
Jesse Rosenthal
76442a791c Powerpoint Writer tests: Add quickcheck tests for content types.
We want to make sure we always have an override for each xml file in
the content types file.
2017-12-29 10:43:36 -05:00
John MacFarlane
8b575dbf84 Filter changes.
* Previously we ran all lua filters before JSON filters.
* Now we run filters in the order they are presented on the
  command line, whether lua or JSON.
* The type of `applyFilters` has changed (incompatible API change).
* `applyLuaFilters` has been removed (incompatible API change).
* Bump version to 2.1.

See #4196.
2017-12-28 16:39:52 -08:00
John MacFarlane
3494b6efd3 Powerpoint writer tests: use IO.
Otherwise we can't find the data files when compiled
with -embed_data_files.
2017-12-28 12:06:38 -08:00
John MacFarlane
d5770b7496 Moved makeCanoncial definition out of ifdef!
Also added slide2 to the default pptx, and reordered
the data files in pandoc.cabal.
2017-12-28 11:03:53 -08:00
John MacFarlane
51b7fe85a8 Added data/docx/word/comments.xml to pandoc.cabal data files. 2017-12-28 10:31:37 -08:00
Jesse Rosenthal
c1fbf7257b PowerPoint writer: Introduce beginning of tests
This is the beginning of a test suite for the powerpoint
writer. Initial tests are for the number of slides.

Note that at the moment it does not test against corruption in
Microsoft PowerPoint; it just tests that certain outcomes work as
expected. More tests will be added.

This test framework uses the PandocPure monad introduced with Pandoc 2.0.
2017-12-28 10:51:03 -05:00
Albert Krewinkel
e5c8b65004
Org reader: support minlevel option for includes
The level of headers in included files can be shifted to a higher level
by specifying a minimum header level via the `:minlevel` parameter. E.g.
`#+include: "tour.org" :minlevel 1` will shift the headers in tour.org
such that the topmost headers become level 1 headers.

Fixes: #4154
2017-12-28 14:16:04 +01:00
Albert Krewinkel
2d443ecb07
Break-up org reader test file
The org reader test file had grown large, to the point that editor
performance was negatively affected in some cases. The tests are spread
over multiple submodules, and re-combined into a tasty TestTree in the
main org reader test file.
2017-12-28 14:15:58 +01:00
John MacFarlane
1ce426a9cb Add custom tests to pandoc.cabal 2017-12-27 10:48:19 -08:00
John MacFarlane
2af478c3b5 Bump to 2.0.6. 2017-12-23 23:20:33 -08:00
John MacFarlane
a848d3e031 Mention JATS output (and input) in MANUAL, README, cabal description. 2017-12-21 22:20:38 -08:00
John MacFarlane
af04881655
Merge pull request #4177 from stencila/jats-xml-reader
Add Basic JATS reader based on DocBook reader
2017-12-21 23:16:03 -07:00
Albert Krewinkel
bd3ea72371
Lua modules: added pandoc.utils module
A new module `pandoc.utils` has been created. It holds utility functions
like `sha1`, which was moved from the main `pandoc` module.
2017-12-21 22:42:59 +01:00
Albert Krewinkel
5ad719c1fb
Lua modules: make a Haskell module for each Lua module
Definitions for the `pandoc.mediabag` modules are moved to a separate
Haskell module.

Change: minor
2017-12-21 22:42:59 +01:00
Albert Krewinkel
ab3c506584
Lua modules: move to dedicated submodule
The Haskell module defining the Lua `pandoc` module is moved to
Text.Pandoc.Lua.Module.Pandoc.

Change: minor
2017-12-21 22:42:59 +01:00