aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc.hs
AgeCommit message (Collapse)AuthorFilesLines
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.
2014-07-30Moved MediaBag back from Shared to Options, to avoid module cycle.John MacFarlane1-1/+1
2014-07-30Moved MediaBag from Shared to Options.John MacFarlane1-1/+1
This will allow us to put a MediaBag in WriterOptions.
2014-07-30Pandoc.hs: change BSReader to output MediaBag as well as pandoc.Jesse Rosenthal1-3/+3
2014-07-27Txt2Tags Reader: Added recognition of macrosMatthew Pickering1-1/+2
2014-07-27Txt2Tags Reader: Integrated into pandocMatthew Pickering1-0/+4
2014-07-12Removed space at ends of lines in source.John MacFarlane1-1/+1
2014-06-29Merge remote-tracking branch 'jgm/master' into dokuwikiClare Macrae1-106/+86
2014-06-18Finished first draft of Haddock writer.John MacFarlane1-0/+3
2014-06-16Naming: Use Docx instead of DocX.John MacFarlane1-3/+3
For consistency with the existing writer.
2014-06-16Integrated the docx reader into the main pandoc program.mpickering1-20/+36
Changes also include generalising the types of reader allowed. The mechanism now mimics the more general output mechanism.
2014-05-14Org reader: support Pandocs citation extensionAlbert Krewinkel1-1/+1
Citations are defined via the "normal citation" syntax used in markdown, with the sole difference that newlines are not allowed between "[...]". This is for consistency, as org-mode generally disallows newlines between square brackets. The extension is turned on by default and can be turned off via the default syntax-extension mechanism, i.e. by specifying "org-citation" as the input format. Move `citeKey` from Readers.Markdown into Parsing The function can be used by other readers, so it is made accessible for all parsers.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2014-04-27Fix #1267.John MacFarlane1-19/+16
We now check the writerName for a lua script in pandoc.hs, so that lowercasing and format parsing aren't done. Note this behavior change: getWriter in Text.Pandoc no longer returns a custom writer on input "foo.lua".
2014-03-04Merge branch 'master' of https://github.com/mb21/pandoc into mb21-masterJohn MacFarlane1-0/+3
2014-03-04Add a simple Emacs Org-mode readerAlbert Krewinkel1-0/+3
The basic structure of org-mode documents is recognized; however, org-mode features like todo markers, tags etc. are not supported yet.
2014-02-28InDesign ICML Writermb211-0/+3
2013-12-06Text.Pandoc: Don't default to pandocExtensions for all writers.John MacFarlane1-1/+4
In particular, we don't want to default to math parsing for the HTML writer.
2013-08-08Pass writename as argument to filters.John MacFarlane1-4/+1
This way filters can figure out what the target format is and react appropriately. Example: #!/usr/bin/env runghc import Text.Pandoc.JSON import Data.Char main = toJSONFilter cap where cap (Just "html") (Str xs) = Str $ map toUpper xs cap _ x = x This capitalizes text only for html output.
2013-08-03Text.Pandoc: Don't reexport ToJSONFilter.John MacFarlane1-2/+2
It's better just to import this from Text.Pandoc.JSON. That way, compiled filters will be smaller in size.
2013-08-03Text.Pandoc.JSON: Use To/FromJSON instances from pandoc-types.John MacFarlane1-62/+12
* These use GHC generics rather than syb, and are faster. * toJsonFilter is now a deprecated synonym of toJSONFilter from Text.Pandoc.JSON. * The deprecated jsonFilter function has been removed.
2013-07-23Text.Pandoc: Added readJSON, writeJSON to the API.John MacFarlane1-9/+17
Closes #817.
2013-07-14Initial work to create dokuwiki writer (#386)Clare Macrae1-0/+3
In this first version, all dokuwiki files are straight copies of the media wiki counterparts.
2013-06-24Use new flexible metadata type.John MacFarlane1-16/+16
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-06-24Use aeson for json.John MacFarlane1-13/+24
Benchmarked: about twice as slow as json!
2013-05-09Removed obsolete comment.John MacFarlane1-3/+0