summaryrefslogtreecommitdiff
path: root/src/Text
Commit message (Collapse)AuthorAge
* HTML reader: Added warnings for ignored material.John MacFarlane2017-02-10
| | | | See #3392.
* LaTeX reader: Issue warnings when skipping unknown latex commands.John MacFarlane2017-02-09
| | | | See #3392.
* Reverted deferred media bag code.John MacFarlane2017-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was not actually being used. Since it adds considerable complexity, it's best not to include it unless we are actually going to use it. The original thought was that we could do all loading in the readers, always deferred and thus costless. This was supposed to eliminate the need to traverse trees loading resources in the docx, epub, odt writers and in PDF and SelfContained. (It would also have the side effect that --extract-media could be used with all input formats. This wasn't an intended side effect, and it could be debated whether it's desirable, since --extract-media was originally designed to extract the media contained in a docx or odt or epub container.) However, we never actually took the step of moving all of this work to the readers, for a couple of reasons. The main reason is that we'd still need to fetch resources in the docx, epub, odt, pdf and self-contained writers, since the Pandoc AST might have been built programatically and hence not generated by a reader. So it's not clear that doing lazy loading in the readers would have any real advantage. I'm still not completely sure about this --- if we change our minds it would be easy to undo this commit. @jkr comments welcome.
* LaTeX reader: support `\lstinputlisting`.John MacFarlane2017-02-08
| | | | Closes #2116.
* RST reader: Improved admonition support.John MacFarlane2017-02-07
| | | | | | | | | | | * We no longer add an "admonition" class, we just use the class for the type of admonition, "note" for example. * We put the word corresponding to the label in a paragraph inside a div at the beginning of the admonition with class "admonition-title". * This is about as close as we can get to RST's own output. See #223.
* Refactored some files formerly in LaTeX reader.John MacFarlane2017-02-07
| | | | | | | * Export readFileFromDirs from Class. * Export insertIncludedFile from Parsing. Simplified code in LaTeX/RST readers.
* Moved readFileFromDirs to Text.Pandoc.Class.John MacFarlane2017-02-07
| | | | | This can be used in several different modules, not just LaTeX reader.
* Refactored include file handling in LaTeX reader.John MacFarlane2017-02-07
|
* Removed --parse-raw and readerParseRaw.John MacFarlane2017-02-06
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix importJohn MacFarlane2017-02-06
|
* Changed year on copyright message.John MacFarlane2017-02-06
|
* Consolidated file arguments into Opt.John MacFarlane2017-02-06
|
* Further refactoring of App.John MacFarlane2017-02-06
| | | | | Moved option parsing code into App. pandoc.hs is now a 2-liner.
* Fix an unneeded import warning.John MacFarlane2017-02-05
|
* Handle language in inline code with --listings.John MacFarlane2017-02-05
| | | | Closes #3422.
* Split pandoc.hs into a module, Text.Pandoc.App, and a small program.John MacFarlane2017-02-05
| | | | | | | | | | | | | | | 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.
* Removed redundant import.John MacFarlane2017-02-05
|
* Allow user to specify User-Agent (#3421)Thenaesh Elango2017-02-05
| | | | | | | | | 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>
* Changed writerEpubMetadata to a Maybe String.John MacFarlane2017-02-04
| | | | API change.
* Improved escaping in RST writer with smart option.John MacFarlane2017-02-04
|
* Org writer: reduce to two spaces after bulletsAlbert Krewinkel2017-02-04
| | | | | | | | 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
* Markdown writer: Better escaping when +smart.John MacFarlane2017-02-04
|
* Expose setVerbosity in Text.PandocJohn MacFarlane2017-02-04
|
* Implemented +/-smart in rst writer.John MacFarlane2017-02-04
| | | | Moved unsmartify to Writers.Shared.
* Docx reader: handle local namespace declarations.John MacFarlane2017-02-03
| | | | | | | | | | | 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.
* Docx reader: Don't drop smartTag contents.John MacFarlane2017-02-03
| | | | | | | | | 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.
* HTML and DocBook writers: fix internal links with writerIdentifierPrefix opt ↵Mauro Bieg2017-02-03
| | | | | (#3398) closes #3397
* Org.hs: remove misleading commentAlexander Krotov2017-02-02
| | | This comment is likely copied from RST.hs where 'refs' variable indeed exists, but makes no sense here.
* Reduce state in Org writer (#3404)Alexander Krotov2017-02-01
|
* `--mathml` and MathML in HTMLMathMethod longer take an argument.John MacFarlane2017-01-30
| | | | | The argument was for a bridge javascript that used to be necessary in 2004. We have removed the script already.
* Make epub an alias for epub3, not epub2.John MacFarlane2017-01-30
|
* Removed some old commented-out code.John MacFarlane2017-01-28
|
* LaTeX writer: export writeBeamer.John MacFarlane2017-01-28
| | | | Removed writerBeamer from WriterOptions.
* HTML: export separate functions for slide formats.John MacFarlane2017-01-27
| | | | | | writeS5, writeSlideous, writeRevealJs, writeDZSlides, writeSlidy. Removed writerSlideVariant from WriterOptions.
* Shared: rename compactify', compactify'DL -> compactify, compactifyDL.John MacFarlane2017-01-27
|
* Removed Shared.compactify.John MacFarlane2017-01-27
| | | | Changed signatures on Parsing.tableWith and Parsing.gridTableWith.
* Expose FileTree in ClassJohn MacFarlane2017-01-27
|
* HTML writer: export writeHtmlStringForEPUB.John MacFarlane2017-01-27
| | | | Options: Remove writerEPUBVersion.
* Split writeDocbook into writeDocbook4, writeDocbook5.John MacFarlane2017-01-26
| | | | | | | Removed writerDocbookVersion in WriterOptions. Renamed default.docbook template to default.docbook4. Allow docbook4 as an output format. But alias docbook = docbook4.
* EPUB writer: split writeEPUB into writeEPUB2, writeEPUB3.John MacFarlane2017-01-26
| | | | Also include explicit epub2 output format in CLI tool.
* Provide explicit separate functions for HTML 4 and 5.John MacFarlane2017-01-25
| | | | | | | | | * 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".
* Removed unneeded exports.John MacFarlane2017-01-25
|
* Cleanups for rebase.John MacFarlane2017-01-25
|
* Fixed small mistake in instance for logOutput.John MacFarlane2017-01-25
|
* Removed readerVerbosity and writerVerbosity.John MacFarlane2017-01-25
| | | | | | API change. Also added a verbosity parameter to makePDF.
* More logging-related changes.John MacFarlane2017-01-25
| | | | | | | | | | | | | | | | | | 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.
* Class: Changes around logging.John MacFarlane2017-01-25
| | | | | | | * 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.
* Changes to verbosity in writer and reader options.John MacFarlane2017-01-25
| | | | | | | | | | | | | | 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.
* Removed writerHighlight; made writerHighlightStyle a Maybe.John MacFarlane2017-01-25
| | | | | | API change. For no highlighting, set writerHighlightStyle to Nothing.
* Removed vestigial writerMediaBag from WriterOptions.John MacFarlane2017-01-25
| | | | API change.