summaryrefslogtreecommitdiff
path: root/pandoc.hs
Commit message (Collapse)AuthorAge
* 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 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.
* 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 writerIgnoreNotes.John MacFarlane2017-01-25
| | | | | | | | | 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.
* Removed unused readerFileScope.John MacFarlane2017-01-25
| | | | API change.
* Removed writerMediaBag from WriterOpts.John MacFarlane2017-01-25
| | | | | | ...since this is now handled through PandocMonad. Added an explicit MediaBag parameter to makePDF and makeSelfContained.
* Removed writerTeXLigatures.John MacFarlane2017-01-25
| | | | | | Make `smart` extension work in LaTeX/ConTeXt writers instead. Instead of `-t latex --no-tex-ligatures`, do `-t latex-smart`.
* Made `smart` extension default for pandoc markdown.John MacFarlane2017-01-25
| | | | Updated tests.
* Removed readerOldDashes and --old-dashes option, added old_dashes extension.John MacFarlane2017-01-25
| | | | API change. CLI option change.
* Removed readerSmart and the --smart option; added Ext_smart extension.John MacFarlane2017-01-25
| | | | | | | | | | | | | | | | | Now you will need to do -f markdown+smart instead of -f markdown --smart This change opens the way for writers, in addition to readers, to be sensitive to +smart, but this change hasn't yet been made. API change. Command-line option change. Updated manual.
* Make Extensions a custom type instead of a Set Extension.John MacFarlane2017-01-25
| | | | | | | | | The type is implemented in terms of an underlying bitset which should be more efficient. API change: from Text.Pandoc.Extensions export Extensions, emptyExtensions, extensionsFromList, enableExtension, disableExtension, extensionEnabled.
* Removed `--normalize` option and normalization functions from Shared.John MacFarlane2017-01-25
| | | | | | | | | | | | | * Removed normalize, normalizeInlines, normalizeBlocks from Text.Pandoc.Shared. These shouldn't now be necessary, since normalization is handled automatically by the Builder monoid instance. * Remove `--normalize` command-line option. * Don't use normalize in tests. * A few revisions to readers so they work well without normalize.
* pandoc.hs: moved main loop to beginning of file.John MacFarlane2017-01-25
|
* Refactored pandoc.hs so that all the runIO' part comes at the end.John MacFarlane2017-01-25
|
* pandoc.hs - moved some utility functions out of main loop.John MacFarlane2017-01-25
|
* More refactoring of pandoc.hs for clarity.John MacFarlane2017-01-25
|
* Put filter running code into MonadIOJohn MacFarlane2017-01-25
|
* Fixed a misleading comment.John MacFarlane2017-01-25
|
* Added a type signatureJohn MacFarlane2017-01-25
|
* More refactoring of pandoc.hs for clarity.John MacFarlane2017-01-25
|
* Slight code rearrangement in preparation for...John MacFarlane2017-01-25
| | | | ...passing mediabag in the PandocIO monad.
* Removed deprecated `--no-wrap` option.John MacFarlane2017-01-25
|
* Removed deprecated `--chapters` option.John MacFarlane2017-01-25
|
* Simplified reference-docx/reference-odt to reference-doc.John MacFarlane2017-01-25
| | | | | | | | | | | | * Text.Pandoc.Options.WriterOptions: removed writerReferenceDocx and writerReferenceODT, replaced them with writerReferenceDoc. This can hold either an ODT or a Docx. In this way, writerReferenceDoc is like writerTemplate, which can hold templates of different formats. [API change] * Removed `--reference-docx` and `--reference-odt` options. * Added `--reference-doc` option.
* Process.pipeProcess: stream stderr rather than capturing.John MacFarlane2017-01-25
| | | | | | | | | | | Signature of pipeProcess has changed: the return value is now IO (ExitCode, ByteString) -- with only stdout. Stderr is just inherited from the parent. This means that stderr from filters will now be streamed as the filters are run. Closes #2729.
* Added `--fail-if-warnings` option.John MacFarlane2017-01-25
|
* LaTeX reader: Proper include file processing.John MacFarlane2017-01-25
| | | | | | * Removed handleIncludes from LaTeX reader [API change]. * Now the ordinary LaTeX reader handles includes in a way that is appropriate to the monad it is run in.
* Added a `--quiet` option to suppress warnings.John MacFarlane2017-01-25
| | | | Use this also in Tests.Old.
* New withWarningsToStderr exported from Text.Pandoc.Class.John MacFarlane2017-01-25
| | | | And use this in pandoc.hs so that messages actually get printed.
* Remove redundant import.Jesse Rosenthal2017-01-25
|
* Finish converting readers over.Jesse Rosenthal2017-01-25
|
* Have to do some work to get the mediabag out.Jesse Rosenthal2017-01-25
|
* Deleted whitespace at end of source lines.John MacFarlane2017-01-25
|
* Clean up Text.PandocJesse Rosenthal2017-01-25
| | | | | | | 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.
* Convert all writers to use PandocMonad.Jesse Rosenthal2017-01-25
| | | | | | | | | | | | | | | 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.
* Some fixes to permit breezeDark style.John MacFarlane2017-01-19
|
* Add breezeDark to the list of highlighting styles.John MacFarlane2017-01-19
|
* Updates to use skylighting rather than highlighting-kate.John MacFarlane2016-12-23
| | | | | | | | So far this just reproduces capacity. Later we'll be able to add features like warning messages, dynamic loading of xml syntax definitions, and dynamic loading of themes.
* We no longer need the MathMLInHTML.js shim from 2004!John MacFarlane2016-12-09
|
* Set PANDOC_VERSION environment variable for filters.John MacFarlane2016-12-08
| | | | Closes #2640.
* Fixed bash completion for filenames with spaces.John MacFarlane2016-12-07
| | | | Closes #2749.
* Options: Removed writerStandalone, made writerTemplate a Maybe.John MacFarlane2016-11-30
| | | | | | | | Previously setting writerStandalone = True did nothing unless a template was provided in writerTemplate. Now a fragment will be generated if writerTemplate is Nothing; otherwise, the specified template will be used and standalone output generated. [API change]
* Refactor top-level division selection (#3261)Albert Krewinkel2016-11-27
| | | | | | | | | | | | | | The "default" option is no longer represented as `Nothing` but via a new type constructor, making the `Maybe` wrapper superfluous. The default behavior of using heuristics can now be enabled explicitly by setting `--top-level-division=default`. API change (`Text.Pandoc.Options`): The `Division` type was renamed to `TopLevelDivision`. The `Section`, `Chapter`, and `Part` constructors were renamed to `TopLevelSection`, `TopLevelChapter`, and `TopLevelPart`, respectively. An additional `TopLevelDefault` constructor was added, which is now also the new default value of the `writerTopLevelDivision` field in `WriterOptions`.
* Allow to overwrite top-level division type heuristics (#3258)Albert Krewinkel2016-11-26
| | | | | | | | | | | | | Pandoc uses heuristics to determine the most resonable top-level division type when emitting LaTeX or Docbook markup. It is now possible to overwrite this implicitly set top-level division via the `top-level-division` command line parameter. API change (`Text.Pandoc.Options`): the type of the `writerTopLevelDivision` field in of the `WriterOptions` data type is altered from `Division` to `Maybe Division`. The field's default value is changed from `Section` to `Nothing`. Closes: #3197
* Cleaned up filter-finding.John MacFarlane2016-11-21
| | | | | | * Removed a hardcoded '/' that may have caused problems with Windows paths. * Cleaned up the logic.
* Changed resolution of filter paths.John MacFarlane2016-11-21
| | | | | | | | | | | | | | | | | | | | | | | | - We now first treat the argument of `--filter` as a full (absolute or relative) path, looking for a program there. If it's found, we run it. - If not, and if it is a simple program name or a relative path, we try resolving it relative to `$DATADIR/filters`. - If this fails, then we treat it as a program name and look in the user's PATH. Previously if you did `--filter foo` and you had `foo` in your path and also an executable `foo` in your working directory, the one in the path would be used. Now the one in the working directory is used. In addition, when you do `--filter foo/bar.hs`, pandoc will now find a filter `$DATADIR/filters/foo/bar.hs` -- assuming there isn't a `foo/bar.hs` relative to the working directory. @jkr note the slight revision of what we had before. This was motivated by the idea that one might clone filter repositories into the filters subdirectory; it is nice to be able to run them as `reponame/filtername`.
* In --version, trap error in getAppUserDataDirectory.John MacFarlane2016-11-18
| | | | | This fixes a crash with `pandoc --version` on unusual systems with no real user (e.g. SQL Server 2016). Closes #3241.
* Allow `file://` URIs as arguments.John MacFarlane2016-11-05
| | | | | | | | Also improved default reader format detection. Previously with a URI ending in .md or .markdown, pandoc would assume HTML input. Now it treats these as markdown. Closes #3196.