Commit graph

740 commits

Author SHA1 Message Date
John MacFarlane
a63cb7ea0b Allow process 1.3. 2015-11-14 13:50:00 -08:00
John MacFarlane
0a6aaf5e1b Added emoji extension to Markdown.
This is enabled by default in `markdown_github`.
Added `Ext_emoji` to `Extension` in `Text.Pandoc.Options` (API change).

Closes #2523.
2015-11-13 12:14:24 -08:00
John MacFarlane
193f00bc33 Bump version to 1.15.2. 2015-11-12 18:52:12 -08:00
John MacFarlane
c1e474f005 Restored Text.Pandoc.Compat.Monoid.
Don't use custom prelude for latest ghc.

This is a better approach to making 'stack ghci' and 'cabal repl'
work.  Instead of using NoImplicitPrelude, we only use the custom
prelude for older ghc versions.  The custom prelude presents a
uniform API that matches the current base version's prelude.
So, when developing (presumably with latest ghc), we don't
use a custom prelude at all and hence have no trouble with ghci.

The custom prelude no longer exports (<>):  we now want to
match the base 4.8 prelude behavior.
2015-11-09 11:19:25 -08:00
John MacFarlane
23b693c029 Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."
This reverts commit c423dbb5a3.
2015-11-09 10:08:22 -08:00
John MacFarlane
777d717d22 Revert "Use Default-extensions rather than ghc-options for NoImplicitPrelude."
This reverts commit 67cabb2a0d.
2015-11-09 10:08:14 -08:00
John MacFarlane
384d03dcfe Revert "Give up support for ghc 7.4."
This reverts commit e0c83f74f3.
2015-11-09 10:07:52 -08:00
John MacFarlane
e0c83f74f3 Give up support for ghc 7.4. 2015-11-08 21:43:31 -08:00
John MacFarlane
67cabb2a0d Use Default-extensions rather than ghc-options for NoImplicitPrelude.
To satisfy 'cabal check'.
2015-11-08 21:10:31 -08:00
John MacFarlane
c423dbb5a3 Use -XNoImplicitPrelude and 'import Prelude' explicitly.
This is needed for ghci to work with pandoc, given that we
now use a custom prelude.

Closes #2503.
2015-11-08 16:56:59 -08:00
John MacFarlane
3b4d5d26a5 Change default for old-locale flag to False. 2015-10-27 23:26:02 -07:00
John MacFarlane
a777c6e2ae Added Paths_pandoc to other-modules for executable stanza. 2015-10-24 22:11:46 -07:00
John MacFarlane
7f5a677bbf Version bump to 1.15.1.1, updated changelog. 2015-10-17 22:23:37 -07:00
John MacFarlane
6dc3b6585d More changes to avoid compiler warnings on ghc 7.10.
* CPP around deprecated `parseTime`.
* Text.Pandoc.Compat.Locale -> Text.Pandoc.Compat.Time,
  now exports Data.Time.
2015-10-14 10:06:18 -07:00
John MacFarlane
82b3e0ab97 Use custom Prelude to avoid compiler warnings.
- 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-10-14 09:09:10 -07:00
John MacFarlane
2c15b1fcac Added ghc-prim to build-depends.
This is needed for the Generic instance of PandocError.

Closes #2448.
2015-10-12 14:28:11 -07:00
John MacFarlane
72b038d201 Merge pull request #2412 from frerich/reader/docbook/xref_support
Added support for <xref> tag in DocBook reader
2015-10-10 14:18:28 -07:00
John MacFarlane
70ebccf93b Updated benchmark program. 2015-10-09 18:08:47 -07:00
John MacFarlane
3687dc36d5 Test also on ghc 7.4.2.
Made make_travis_yml.hs a bit more robust.
2015-10-09 14:44:32 -07:00
John MacFarlane
c13494c808 New .travis.yml.
Autgenerated using make_travis_yml.hs.

This script has been modified to add GHCOPTS.

'make .travis.yml' regenerates it based on the tested-with
field of the cabal file.
2015-10-08 13:39:32 -07:00
John MacFarlane
db936f7233 Allow http-types 0.9. 2015-10-06 09:14:32 -07:00
John MacFarlane
747a7a4cf8 Allow HUnit 1.3 2015-10-03 16:19:53 -07:00
Frerich Raabe
35f12b5095 Added proper support for DocBook 'xref' elements
'xref' is used to create cross references to other parts of the
document. It is an empty element - the cross reference text depends on
various attributes. Quoting 'DocBook: The Definitive Guide':

  1. If the endterm attribute is specified on xref, the content of the
  element pointed to by endterm will be used as the text of the
  cross-reference.

  2. Otherwise, if the object pointed to has a specified XRefLabel, the
  content of that attribute will be used as the cross-reference text.
2015-09-24 18:26:55 +02:00
John MacFarlane
0c7d6fbaba Allow syb 0.6. 2015-09-23 12:30:14 -07:00
John MacFarlane
d25a37c122 Allow aeson 0.10. 2015-09-20 13:19:16 -07:00
John MacFarlane
73824908aa Added --bash-completion option.
This generates a bash completion script.

To use:

     eval "$(pandoc --bash-completion)"
2015-08-13 15:27:47 -07:00
John MacFarlane
50dddecb53 Update version to 1.15.1. 2015-08-10 16:38:16 -07:00
John MacFarlane
609c8231da Allow latest criterion version. 2015-08-10 16:02:00 -07:00
John MacFarlane
74c31abb1a Merge pull request #2327 from hftf/list-style
HTML Reader: Correctly parse inline list-style(-type) for <ol>
2015-08-07 11:08:53 -07:00
John MacFarlane
b08330be86 Require pandoc-types >= 1.14 2015-07-27 21:53:09 +02:00
Ophir Lifshitz
7ef8700734 HTML Reader: Parse <ol> type, class, and inline list-style(-type) CSS 2015-07-24 02:53:17 -04:00
John MacFarlane
2b68f7af15 Updated README and cabal description for ODT reader. 2015-07-23 15:54:18 -07:00
MarLinn
f068093555 Added odt reader
Fully implemented features:

* Paragraphs
* Headers
* Basic styling
* Unordered lists
* Ordered lists
* External Links
* Internal Links
* Footnotes, Endnotes
* Blockquotes

Partly implemented features:

* Citations
  Very basic, but pandoc can't do much more
* Tables
  No headers, no sizing, limited styling
2015-07-23 15:37:01 -07:00
John MacFarlane
0c83c391db Version bump to 1.15.0.6. 2015-07-15 08:58:06 -07:00
John MacFarlane
6c32afc3c4 Updated to use cmark >= 0.4. 2015-07-14 22:51:23 -07:00
John MacFarlane
dce6a7388a Allow vector 0.11. 2015-07-14 09:23:47 -07:00
John MacFarlane
5f730ee804 Version bump to 1.15.0.5 and updated changelog. 2015-07-09 22:50:13 -07:00
John MacFarlane
f1103f8f69 Make cabal require hsb2hs >= 0.3.1.
This is done by adding `hookedPrograms` in `Setup.hs`,
which allows us to include `hsb2hs` in Build-Tools in cabal.
2015-07-05 13:50:10 -07:00
John MacFarlane
79764df2d5 Added pandoc.1 to repository. Don't build as part of cabal build.
The process was too fragile.  It made too many assumptions about
available libraries (which failed sometimes when sandboxes were
used).  This is a low-tech solution.  The only drawback is that
`man/pandoc.1` is a generated file in the repository.  It will need
to be regenerated periodically when README changes.
2015-07-02 22:12:38 -07:00
John MacFarlane
a945d702c0 Bump version to 1.15.0.4. 2015-07-02 20:48:31 -07:00
John MacFarlane
9044229531 Bump version to 1.15.0.3, updated changelog. 2015-07-02 09:32:45 -07:00
John MacFarlane
f30b2d4629 Version bump to 1.15.0.2, updated changelog. 2015-07-02 08:13:28 -07:00
John MacFarlane
dce8dd6e6b Added man page source files to extra-source-files. 2015-07-02 08:01:22 -07:00
John MacFarlane
49da3e70cd Bump version to 1.15.0.1, update changelog. 2015-07-01 18:05:00 -07:00
John MacFarlane
9ffd1babc7 Install man pages as part of cabal 'copy' phase. 2015-07-01 18:01:21 -07:00
John MacFarlane
28cb50503b Generate man page in cabal build process and include in data/.
The pandoc.1 man page is generated automatically after the cabal
build process.  It goes in `data/pandoc.1`.  It can be obtained
by the user who installs pandoc via cabal thus:

    pandoc --print-default-data-file pandoc.1 > pandoc.1
2015-07-01 16:29:44 -07:00
John MacFarlane
a04c15a422 New method for building man pages.
+ Removed `--man1`, `--man5` options (breaking change).
+ Removed `Text.Pandoc.ManPages` module (breaking API change).
+ Version bump to 1.15 because of the breaking changes, even
  though they involve features that have only been in pandoc
  for a day.
+ Makefile target for `man/man1/pandoc.1`.  This uses pandoc to
  create the man page from README using a custom template and filters.
+ Added `man/` directory with template and filters needed to build
  man page.
+ We no longer have two man pages: pandoc.1 and pandoc_markdown.5.
  Now there is just pandoc.1, which has all the content from README.
  This change was needed because of the extensive cross-references
  between parts of the README.
+ Removed old `data/pandoc.1.template` and
  `data/pandoc_markdown.5.template`.
2015-07-01 11:27:15 -07:00
John MacFarlane
fe625e053d New method for producing man pages.
This change adds `--man1` and `--man5` options to pandoc, so
pandoc can generate its own man pages.

It removes the old overly complex method of building a separate
executable (but not installing it) just to create the man pages.

The man pages are no longer automatically created in the build
process.

The man/ directory has been removed.  The man page templates
have been moved to data/.

New unexported module:  Text.Pandoc.ManPages.

Text.Pandoc.Data now exports readmeFile, and `readDataFile`
knows how to find README.

Closes #2190.
2015-06-28 14:39:17 -07:00
John MacFarlane
3e5b4faaf2 Version bump to 1.14.1.
Because of the addition of `Options.plainExtensions`.
2015-06-28 11:58:50 -07:00
John MacFarlane
ed9a118b54 Fixed regression in CSS parsing with --self-contained.
In 1b44acf0c5 we replaced some
hackish CSS parsing with css-text, which I thought was a complete
CSS parser.  It turns out that it is very buggy, which results
in lots of things being silently dropped from CSS when
`--self-contained` is used (#2224).

This commit replaces the use of css-text with a small but
more principled css preprocessor, which only removes whitespace
and replaces URLs with base 64 data when possible.

Closes #2224.
2015-06-28 11:54:18 -07:00
Pablo Rodríguez
c18e93ca6e replace old url with pandoc.org 2015-06-09 22:22:58 +02:00
John MacFarlane
70b76bb633 Bump cmark version to >= 0.3.4. 2015-06-08 13:37:11 -07:00
John MacFarlane
bbd429ae70 Version bump to 1.14.0.4, added commonmark template to data files. 2015-06-02 13:23:32 +02:00
John MacFarlane
a367107483 Bump version to 1.14.0.3; updated changelog. 2015-06-01 10:39:00 +02:00
John MacFarlane
a75998ba24 Allow compilation with syb 0.5.*. 2015-05-31 21:18:39 +02:00
John MacFarlane
cb339c7425 Bump to 1.14.0.2, updated changelog. 2015-05-31 14:10:25 +02:00
John MacFarlane
c327b283c1 Allow building with hslua 0.4. 2015-05-31 13:57:14 +02:00
John MacFarlane
b241472a90 Better fix for #2187.
* Reverted kludgy change to make-windows-installer.bat.
* Removed make-reference-fiels.hs.
* Moved the individual ingredients of reference.docx and
  reference.odt to the data directory.
* Removed reference.docx and reference.odt from data directory.
* We now build the reference archives from their ingredient pieces
  in the docx and odt writers, instead of having a reference.docx
  or reference.odt intermediary.

This should fix #2187.

It also simplifies the bulid procedure.

The one thing users may notice is different is that you can
no longer get the reference.docx or reference.odt using
`--print-default-data-file`.  Instead, simply generate a
docx or odt using pandoc with a blank or minimal input,
and use that (or a customized version) with `--reference-docx`
or `--reference-odt`.
2015-05-28 18:15:01 -07:00
John MacFarlane
3b2ca81b8d Added filepath dependency to make-reference-files. 2015-05-28 10:12:37 -07:00
John MacFarlane
43371a96e5 Bump version to 1.14.0.1. 2015-05-28 10:00:20 -07:00
John MacFarlane
a10cf0d080 Don't include generated man pages in extra-source-files.
See 3f20fb3f9f.

Closes #2189.
2015-05-28 09:02:58 -07:00
John MacFarlane
ed43a90259 Bump upper bound for aeson. 2015-05-28 08:46:22 -07:00
John MacFarlane
1daa26468c Require cmark-hs >= 0.3.3 (fixes #2175). 2015-05-26 17:23:32 -07:00
John MacFarlane
21b83a14fa Require highlighting-kate 0.6. 2015-05-26 16:52:33 -07:00
John MacFarlane
e06810499e HTML reader: Support base tag.
We only support the href attribute, as there's no place for
"target" in the Pandoc document model for links.

Added HTML reader test module, with tests for this feature.

Closes #1751.
2015-05-13 20:53:19 -07:00
John MacFarlane
1b44acf0c5 SelfContained: properly handle data URIs in css urls.
Also use a proper css parser (adds dependency on text-css).

Closes #2129.
2015-05-04 16:00:28 -07:00
John MacFarlane
1868cb5e42 Updated copyright notices to -2015. Closes #2111. 2015-04-26 10:18:29 -07:00
RyanGlScott
b65238b412 Bump zlib upper version bounds 2015-04-20 13:52:48 -05:00
John MacFarlane
44fcc5f96e Merge pull request #2079 from lierdakil/rst-normalize-headings
RST Writer: Normalize headings to sequential levels
2015-04-17 19:06:25 -07:00
Nikolay Yakimov
4b7ddeb63f RST Writer: Tests for rubrics and heading normalization 2015-04-16 19:27:33 +03:00
John MacFarlane
693bc5f50f Bump texmath lower bound to 0.8.1 2015-04-13 21:25:06 -07:00
John MacFarlane
ccb828894b Added CommonMark writer.
Added `Text.Pandoc.Writers.CommonMark`, exporting
`writeCommonMark`.
2015-03-29 23:42:42 -07:00
John MacFarlane
cbe32c2aeb Require cmark 0.3.1. 2015-03-29 23:42:42 -07:00
John MacFarlane
3f20fb3f9f Always build man pages. Removed make-pandoc-man-pages flag.
Updated INSTALL instructions.

Makefile:  removed man target, now that we generate man pages by default.
2015-03-28 15:40:50 -07:00
John MacFarlane
524d284b88 Added images needed for docx tests to cabal extra-source-files. 2015-03-28 15:40:50 -07:00
John MacFarlane
07cc0079f7 Added source files for reference.docx/odt to extra-source-files. 2015-03-28 14:22:04 -07:00
John MacFarlane
db28a39ba6 Added Tests.Writers.Docx to cabal file. 2015-03-28 14:12:18 -07:00
John MacFarlane
f986d78c7c Version bump to 1.14.
This is because of the significant API changes in the reader
types.  (They now return an Either value.)
2015-03-28 13:48:53 -07:00
John MacFarlane
6a3a04c428 Merge branch 'errortype' of https://github.com/mpickering/pandoc into mpickering-errortype
Conflicts:
	benchmark/benchmark-pandoc.hs
	src/Text/Pandoc/Readers/Markdown.hs
	src/Text/Pandoc/Readers/Org.hs
	src/Text/Pandoc/Readers/RST.hs
	tests/Tests/Readers/LaTeX.hs
2015-03-28 12:12:48 -07:00
Nikolay Yakimov
d744b83b61 Create reference files from unpacked archives with helper program 2015-03-28 10:36:53 -07:00
John MacFarlane
b5b11f31a6 Fixed ghc-prof-options. 2015-03-28 10:10:14 -07:00
John MacFarlane
3f89e3f332 Require highlighting-kate >= 0.5.14
This ensures that all code blocks will be wrapped in a div
with class sourceCode.  Also, the default highlighting CSS
now adds `div.sourceCode { x-overflow: auto; }`, which means
that code blocks (even with line numbers) will acquire a scroll
bar on screens too small to display them (e.g. mobile phones).

See #1903 and jgm/highlighting-kate#65.
2015-03-28 08:18:01 -07:00
John MacFarlane
12c9aa00de pandoc.cabal: changed default profiling options.
Removed `-auto-all` and `-caf-all` at cabal's suggestion.
Use `-auto-exported` instead.
2015-03-27 22:12:42 -07:00
John MacFarlane
dd5d3379e8 Require highlighting-kate 0.5.13.
Closes #1903.
2015-03-27 13:45:22 -07:00
John MacFarlane
8b8a613cd4 Bumped upper bounds for filepath, QuickCheck.
Bumped lower bounds for highlighting-kate, texmath.
2015-03-19 11:47:20 -07:00
John MacFarlane
e0d234e54d Added CommonMark reader using cmark (libcmark bindings).
- Added commonmark as an input format.
- Added `Text.Pandoc.Readers.CommonMark.readCommonMark`.
- For now, we use the markdown writer to generate benchmark
  text for the CommonMark reader.  We can change this when we
  get a writer.
2015-03-17 16:15:57 -07:00
John MacFarlane
5721a5d34b Bump criterion version bound. 2015-03-17 16:15:56 -07:00
John MacFarlane
619b2e8ca2 Merge pull request #1968 from lierdakil/issue1607
Fixes for multiple docx writer style bugs.
2015-03-16 12:02:40 -07:00
Nikolay Yakimov
409111f647 Started moving StyleMap out of writer code 2015-03-01 22:57:35 +03:00
RyanGlScott
d649acc146 Bump blaze-html and blaze-markup upper version bounds 2015-02-28 16:55:23 -06:00
Matthew Pickering
8381ac3b02 Add Text.Pandoc.Error module with PandocError type 2015-02-18 21:09:05 +00:00
John MacFarlane
e32227f744 Allow wildcards in --epub-embed-font arguments.
Closes #1939.
2015-02-13 23:34:20 -08:00
Mark Wright
4c9ebf3c2b Allow haddock-library 1.2 2015-01-05 14:15:10 +11:00
John MacFarlane
c30c96b422 Version bump to 1.13.3. 2014-12-26 10:05:31 -07:00
John MacFarlane
ccf081d32c Require latest highlighting-kate and texmath. 2014-12-19 21:41:53 -08:00
John MacFarlane
c6ad01dc69 Added old-locale flag.
This will ease transition to time 1.5.  However, currently we can't
build with time 1.5 because of dependencies.
2014-12-19 17:26:14 -08:00
John MacFarlane
2c3310a592 Added Text.Pandoc.Compat.Locale to assist with transition to time 1.5. 2014-12-19 16:13:38 -08:00
Bryan O'Sullivan
dbfb2e1353 Link the test suite using -threaded
This allows the test suite to be run using "+RTS -N".

Doing so improves the performance of the test suite on my quad-core Mac laptop as follows:

Before: 8.2 seconds
After:  2.5 seconds
2014-12-08 22:42:45 -08:00
Matthew Pickering
48e2586ec8 Merge pull request #1746 from shelf/dw-ext-images
DokuWiki writer: fix external images
2014-12-08 23:55:36 +00:00
Vincent
dffdb87bec Update pandoc.cabal, Bumping JuicyPixels upper bound 2014-12-06 15:41:34 +01:00