aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-01-25Finished previous commit; removed export of toJsonFilter.John MacFarlane1-2/+0
2017-01-25Removed deprecated toJsonFilter.John MacFarlane1-6/+0
Use toJSONFilter from Text.Pandoc.JSON.
2017-01-25Error: change type of handleError.John MacFarlane1-4/+3
It now lives in IO and gives a proper message + exit instead of calling 'error'. We shouldn't be making it easier for people to raise error on pure code. And this is better for the main application in IO.
2017-01-25Removed readRSTWithWarnings (now useless).John MacFarlane1-1/+1
2017-01-25Class: Renamed 'warn' to 'addWarning' and consolidated RTF writer.John MacFarlane1-2/+1
* Renaming Text.Pandoc.Class.warn to addWarning avoids conflict with Text.Pandoc.Shared.warn. * Removed writeRTFWithEmbeddedImages from Text.Pandoc.Writers.RTF. This is no longer needed; we automatically handle embedded images using the PandocM functions. [API change]
2017-01-25Unify Errors.Jesse Rosenthal1-2/+2
2017-01-25Add Text2Tags to Text.PandocJesse Rosenthal1-4/+2
2017-01-25Working on readers.Jesse Rosenthal1-46/+49
2017-01-25Changed readNative to use PandocMonad.John MacFarlane1-2/+2
2017-01-25Text.Pandoc: Change Reader to Reader m.John MacFarlane1-9/+11
For now I just replaced occurences of Reader with Reader IO, so nothing is really different. When we move readers into instances of PandocMonad, though, we can change things here so that the readers will work with any instance of PandocMonad.
2017-01-25Removed some commented-out source.John MacFarlane1-70/+0
2017-01-25Deleted whitespace at end of source lines.John MacFarlane1-1/+1
2017-01-25Export Text.Pandoc.Class from Text.Pandoc.John MacFarlane1-0/+2
2017-01-25Clean up Text.PandocJesse Rosenthal1-73/+53
We had primed versions of all the Writer types and getWriter functions, as we transitioned. Now that we're using the new ones exclusively, we'll get rid of the old ones, and get rid of the primes in the names.
2017-01-25Convert all writers to use PandocMonad.Jesse Rosenthal1-68/+148
Since PandocMonad is an instance of MonadError, this will allow us, in a future commit, to change all invocations of `error` to `throwError`, which will be preferable for the pure versions. At the moment, we're disabling the lua custom writers (this is temporary). This requires changing the type of the Writer in Text.Pandoc. Right now, we run `runIOorExplode` in pandoc.hs, to make the conversion easier. We can switch it to the safer `runIO` in the future. Note that this required a change to Text.Pandoc.PDF as well. Since running an external program is necessarily IO, we can be clearer about using PandocIO.
2017-01-25Pandoc.hs: Run `runIOorExplode` on IO functions.Jesse Rosenthal1-9/+17
This is a compatibility layer to reintroduce something like the old errors into the functions.
2016-11-18Export Text.Pandoc.getDefaultExtensions.John MacFarlane1-0/+1
See #3178.
2016-10-24Export Text.Pandoc.Error in Text.Pandoc.John MacFarlane1-1/+2
[API change]
2016-10-23fix example in documentation (#3176)Thomas Weißschuh1-2/+2
Errors are encountered while reading, not writing
2016-06-30Added Zim Wiki writer, template and tests.Alex Ivkin1-0/+3
2016-06-23Process markdown extensions on command line in L->R order.John MacFarlane1-1/+1
Previously they were processed, very unintuitively, in R->L order, so that `markdown-tex_math_dollars+tex_math_dollars` had `tex_math_dollars` disabled. Closes #2995.
2016-04-29Write out Docbook 5 namespaceIvo Clarysse1-1/+1
2016-04-29Add docbook5 writer supportIvo Clarysse1-0/+2
2016-03-22Updated copyright dates to include 2016.John MacFarlane1-2/+2
2016-03-12Add a general ByteStringReader with warnings.Jesse Rosenthal1-1/+9
Have docx reader use it.
2016-01-19Add TEI Writer.csforste1-0/+3
2015-11-22hlint fixes.John MacFarlane1-5/+5
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane1-1/+1
mb21-new-image-attributes * Bumped version to 1.16. * Added Attr field to Link and Image. * Added `common_link_attributes` extension. * Updated readers for link attributes. * Updated writers for link attributes. * Updated tests * Updated stack.yaml to build against unreleased versions of pandoc-types and texmath. * Fixed various compiler warnings. Closes #261. TODO: * Relative (percentage) image widths in docx writer. * ODT/OpenDocument writer (untested, same issue about percentage widths). * Update pandoc-citeproc.
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-10Re-export pandocVersions from Text.Pandoc.John MacFarlane1-1/+2
The actual definition has been moved to Text.Pandoc.Shared, but to avoid breaking changes we reexport it here.
2015-10-01Move the variable pandocVersion from `src/Text/Pandoc.hs` toAlex Vong1-8/+0
`src/Text/Pandoc/Shared.hs`, so that all Writers can access this variable without importing `src/Text/Pandoc.hs`, preventing circular import. * pandoc.hs: Import pandocVersion from `Text.Pandoc.Shared`. * src/Text/Pandoc.hs: Remove the definition of pandocVersion and relevant import. * src/Text/Pandoc/Shared.hs: Add the definition of pandocVersion and relevant import.
2015-08-15Org reader: add auto identifiers if not present on headersJuliusz Gonera1-1/+2
Refs #2354 This should also fix the table of contents (--toc) when generating a html file from org input
2015-08-08Text.Pandoc: disable auto_identifiers for epub.John MacFarlane1-2/+1
The epub writer inserts its own auto identifiers; this is more complex due to splitting into "chapter" files.
2015-08-05ICML writer: changed type of `writeICML`.John MacFarlane1-1/+1
API change: It is now `WriterOptions -> Pandoc -> IO String`. Also handle new image attributes. (mb21)
2015-07-23Added odt readerMarLinn1-1/+4
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-06-27Plain writer: don't use symbols for super/subscript.John MacFarlane1-1/+1
Simplified code by using plainExtensions from Options. Closes #2237.
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2015-03-29Added CommonMark writer.John MacFarlane1-0/+3
Added `Text.Pandoc.Writers.CommonMark`, exporting `writeCommonMark`.
2015-03-28Updated code example in Text.Pandoc.John MacFarlane1-2/+4
2015-03-28Merge branch 'errortype' of https://github.com/mpickering/pandoc into ↵John MacFarlane1-11/+15
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-17Added CommonMark reader using cmark (libcmark bindings).John MacFarlane1-0/+3
- 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-02-18Move utility error functions to Text.Pandoc.SharedMatthew Pickering1-1/+1
2015-02-18Update Pandoc.hsMatthew Pickering1-10/+14
2014-12-12expose warnings from RST reader; refactorDaniel Bergey1-13/+12
This commit moves some code which was only used for the Markdown Reader into a generic form which can be used for any Reader. Otherwise, it takes naming and interface cues from the preexisting Markdown code.
2014-10-30TWiki Reader: add new new twiki readerAlexander Sulfrian1-0/+3
2014-08-14Make `raw_tex` extension non-default for textile reader, writer.John MacFarlane1-2/+1
Enable `raw_tex` extension in textile writer. Closes #1532.
2014-08-08Added `native_divs` and `native_spans` extensions.John MacFarlane1-1/+11
This allows users to turn off the default pandoc behavior of parsing contents of div and span tags in markdown and HTML as native pandoc Div blocks and Span inlines. Setting of default epub extensions has been moved from the EPUB reader to Text.Pandoc.
2014-07-31EPUB Reader: Integrated into programMatthew Pickering1-0/+3
2014-07-31New module, Text.Pandoc.MediaBag.John MacFarlane1-1/+2
Moved `MediaBag` definition and functions from Shared: `lookupMedia`, `mediaDirectory`, `insertMedia`, `extractMediaBag`. Removed `emptyMediaBag`; use `mempty` instead, since `MediaBag` is a Monoid.