aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)AuthorFilesLines
2017-02-07Refactored include file handling in LaTeX reader.John MacFarlane1-14/+16
2017-02-06Removed --parse-raw and readerParseRaw.John MacFarlane9-47/+38
These were confusing. Now we rely on the +raw_tex or +raw_html extension with latex or html input. Thus, instead of --parse-raw -f latex we use -f latex+raw_tex and instead of --parse-raw -f html we use -f html+raw_html
2017-02-06Fix importJohn MacFarlane1-1/+1
2017-02-06Changed year on copyright message.John MacFarlane1-1/+1
2017-02-06Consolidated file arguments into Opt.John MacFarlane1-4/+7
2017-02-06Further refactoring of App.John MacFarlane1-8/+724
Moved option parsing code into App. pandoc.hs is now a 2-liner.
2017-02-05Fix an unneeded import warning.John MacFarlane1-1/+1
2017-02-05Handle language in inline code with --listings.John MacFarlane1-4/+9
Closes #3422.
2017-02-05Split pandoc.hs into a module, Text.Pandoc.App, and a small program.John MacFarlane2-1/+733
The App module provides a function that does a pandoc conversion, based on option settings. The program (pandoc.hs) now does nothing more than parse options and pass them to this function, which can easily be used by other applications (e.g. a GUI wrapper). The Opt structure has been further simplified. API changes: * New exposed module Text.Pandoc.App * Text.Pandoc.Highlighting has been exposed. * highlightingStyles has been moved to Text.Pandoc.Highlighting.
2017-02-05Removed redundant import.John MacFarlane1-1/+0
2017-02-05Allow user to specify User-Agent (#3421)Thenaesh Elango1-3/+11
This commit enables users to specify the User-Agent header used when pandoc requests a document from a URL. This is done by setting an environment variable. For instance, one can do: USER_AGENT="..." ./pandoc -f html -t markdown http://example.com Signed-off-by: Thenaesh Elango <thenaeshelango@gmail.com>
2017-02-04Changed writerEpubMetadata to a Maybe String.John MacFarlane2-3/+3
API change.
2017-02-04Improved escaping in RST writer with smart option.John MacFarlane1-6/+20
2017-02-04Org writer: reduce to two spaces after bulletsAlbert Krewinkel1-2/+2
The org writer was inserting two spaces after list bullets. Emacs Org-mode defaults to a single space, so behavior is changed to reflect this. Closes: #3417
2017-02-04Markdown writer: Better escaping when +smart.John MacFarlane1-17/+21
2017-02-04Expose setVerbosity in Text.PandocJohn MacFarlane1-0/+1
2017-02-04Implemented +/-smart in rst writer.John MacFarlane3-15/+29
Moved unsmartify to Writers.Shared.
2017-02-03Docx reader: handle local namespace declarations.John MacFarlane2-107/+127
Previously we didn't recognize math, for example, when the xmlns declaration occured on the element and not the root. Now we recognize either. Closes #3365. This patch defines findChildByName, findChildrenByName, and findAttrByName in Util, and uses these in Parse.
2017-02-03Docx reader: Don't drop smartTag contents.John MacFarlane2-0/+8
This just parses inside smartTags and yields their contents, ignoring the attributes of the smartTag. @jkr, you may want to adjust this, but I wanted to get a fix in as fast as possible for the dropped content. Closes #2242; see also #3412.
2017-02-03HTML and DocBook writers: fix internal links with writerIdentifierPrefix opt ↵Mauro Bieg2-4/+6
(#3398) closes #3397
2017-02-02Org.hs: remove misleading commentAlexander Krotov1-1/+0
This comment is likely copied from RST.hs where 'refs' variable indeed exists, but makes no sense here.
2017-02-01Reduce state in Org writer (#3404)Alexander Krotov1-8/+3
2017-01-30`--mathml` and MathML in HTMLMathMethod longer take an argument.John MacFarlane5-14/+10
The argument was for a bridge javascript that used to be necessary in 2004. We have removed the script already.
2017-01-30Make epub an alias for epub3, not epub2.John MacFarlane2-2/+2
2017-01-28Removed some old commented-out code.John MacFarlane1-25/+0
2017-01-28LaTeX writer: export writeBeamer.John MacFarlane3-29/+52
Removed writerBeamer from WriterOptions.
2017-01-27HTML: export separate functions for slide formats.John MacFarlane3-66/+121
writeS5, writeSlideous, writeRevealJs, writeDZSlides, writeSlidy. Removed writerSlideVariant from WriterOptions.
2017-01-27Shared: rename compactify', compactify'DL -> compactify, compactifyDL.John MacFarlane7-25/+25
2017-01-27Removed Shared.compactify.John MacFarlane3-37/+25
Changed signatures on Parsing.tableWith and Parsing.gridTableWith.
2017-01-27Expose FileTree in ClassJohn MacFarlane1-0/+1
2017-01-27HTML writer: export writeHtmlStringForEPUB.John MacFarlane3-28/+42
Options: Remove writerEPUBVersion.
2017-01-26Split writeDocbook into writeDocbook4, writeDocbook5.John MacFarlane4-35/+53
Removed writerDocbookVersion in WriterOptions. Renamed default.docbook template to default.docbook4. Allow docbook4 as an output format. But alias docbook = docbook4.
2017-01-26EPUB writer: split writeEPUB into writeEPUB2, writeEPUB3.John MacFarlane3-12/+32
Also include explicit epub2 output format in CLI tool.
2017-01-25Provide explicit separate functions for HTML 4 and 5.John MacFarlane8-71/+103
* Text.Pandoc.Writers.HTML: removed writeHtml, writeHtmlString, added writeHtml4, writeHtml4String, writeHtml5, writeHtml5String. * Removed writerHtml5 from WriterOptions. * Renamed default.html template to default.html4. * "html" now aliases to "html5"; to get the old HTML4 behavior, you must now specify "-t html4".
2017-01-25Removed unneeded exports.John MacFarlane1-2/+0
2017-01-25Cleanups for rebase.John MacFarlane2-3/+3
2017-01-25Fixed small mistake in instance for logOutput.John MacFarlane1-1/+1
2017-01-25Removed readerVerbosity and writerVerbosity.John MacFarlane4-25/+13
API change. Also added a verbosity parameter to makePDF.
2017-01-25More logging-related changes.John MacFarlane6-123/+115
Class: * Removed getWarnings, withWarningsToStderr * Added report * Added logOutput to PandocMonad * Make logOutput streaming in PandocIO monad * Properly reverse getLog output Readers: * Replaced use of trace with report DEBUG. TWiki Reader: Put everything inside PandocMonad m. API changes.
2017-01-25Class: Changes around logging.John MacFarlane1-27/+45
* Export getLog, setVerbosity * Add report to PandocMonad methods. * Redefine warning and getWarnings in terms of getLog and report. * Remove stWarnings from CommonState, add stLog and stVerbosity.
2017-01-25Changes to verbosity in writer and reader options.John MacFarlane9-35/+41
API changes: Text.Pandoc.Options: * Added Verbosity. * Added writerVerbosity. * Added readerVerbosity. * Removed writerVerbose. * Removed readerTrace. pandoc CLI: The `--trace` option sets verbosity to DEBUG; the `--quiet` option sets it to ERROR, and the `--verbose` option sets it to INFO. The default is WARNING.
2017-01-25Removed writerHighlight; made writerHighlightStyle a Maybe.John MacFarlane4-39/+35
API change. For no highlighting, set writerHighlightStyle to Nothing.
2017-01-25Removed vestigial writerMediaBag from WriterOptions.John MacFarlane1-3/+0
API change.
2017-01-25Revert "Added page breaks into Pandoc."John MacFarlane25-89/+13
This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
2017-01-25Fixed shadowing warnings.John MacFarlane1-3/+3
2017-01-25Put an Integer rather than Word64 behind Extensions.John MacFarlane1-3/+2
This allows us to expand indefinitely. No measurable performance penalty.
2017-01-25Removed writerIgnoreNotes.John MacFarlane5-17/+10
Instead, just temporarily remove notes when generating TOC lists in HTML and Markdown (as we already did in LaTeX). Also export deNote from Text.Pandoc.Shared. API change in Shared and Options.WriterOptions.
2017-01-25Factored out deNote in Shared.John MacFarlane1-4/+4
2017-01-25Removed unused readerFileScope.John MacFarlane1-2/+0
API change.
2017-01-25Removed writerMediaBag from WriterOpts.John MacFarlane2-17/+23
...since this is now handled through PandocMonad. Added an explicit MediaBag parameter to makePDF and makeSelfContained.