aboutsummaryrefslogtreecommitdiff
path: root/pandoc-cli/src
AgeCommit message (Collapse)Author
2023-07-19Fix regression on short boolean arguments.John MacFarlane
In 3.1.5 boolean arguments were allowed an optional argument (true|false). This created a regression for uses of fused short arguments, e.g. `-somyfile.html`, which was equivalent to `-s -omyfile.html`, but now raised an error because pandoc attempted to parse `o` as a boolean `true` or `false`. This change adds a preprocessing step on the raw arguments before they are sent to the option parser. In this preprocessing step, `-somyfile.html` would be split into two arguments, `-s` and `-omyfile.html`. The splitting happens when a short boolean option is followed by another short option. Closes #8956.
2023-04-05Purge double space.Andreas Scherer
2023-01-10Update copyright years, it's 2023!Albert Krewinkel
2022-11-02Text.Pandoc.App: Change `parseOptionsFromArgs` and `parseOptions`... (#8406)John MacFarlane
They now return `Either OptInfo Opt`. Add `OptInfo` type. Add `handleOptInfo` function. This performs the IO actions for things like `--version` that were previously done in `parseOptionsFromArgs`. An argument for a `ScriptingEngine` has been added, to facilitate printing custom templates and custom extensions for Lua filters. (However, at this stage nothing is yet done with it.) [API change]
2022-10-31Re-add TemplateHaskell pragma in pandoc-cli.John MacFarlane
This was an hlint false positive.
2022-10-30hlint suggestions.John MacFarlane
2022-10-19Move `defaultUserDataDir` from T.P.Shared to T.P.Data [API change].John MacFarlane
2022-10-19Split Text.Pandoc.Version from Text.Pandoc.Shared.John MacFarlane
This new module exports `pandocVersion` and `pandocVersionText`, which are no longer exported from Text.Pandoc.Shared. [API change] Also, we now set the `pandoc-version` variable centrally rather than in the writers. One effect is the man writer now emits a comment with the pandoc version (this was intended before, judging from the template, but it didn't happen because the vairable wasn't set).
2022-10-13Rollback parameterize options on scripting engine.John MacFarlane
Rolls back 0ab014ed1e5890e338792fab98aecc45cd889f99. We don't need this because we aren't needing to print the Lua version in options any more; we're handling `--version` now at the pandoc-cli level.
2022-10-01Fix `nightly` flag build.John MacFarlane
2022-09-30Remove build versions info from `--version` output.John MacFarlane
2022-09-30Move `--version` handling to pandoc-cli.John MacFarlane
Print flag settings (lua, server) and versions of all relevant packages. Add suffix for nightly builds. Move `nightly` flag from pandoc to pandoc-cli. Closes #8339.
2022-09-30Use `server` as command to start the pandoc serverAlbert Krewinkel
2022-09-30pandoc-cli: Allow building a binary without Lua supportAlbert Krewinkel
Disabling the `lua` cabal flag will result in a binary without Lua.
2022-09-30[API Change] Parameterize `convertWithOpts` over scripting engine.Albert Krewinkel
2022-09-30[API Change] App: parameterize `options` over the scripting engineAlbert Krewinkel
2022-09-30[API Change] Rename `pandocVersion` to `pandocVersionText`...Albert Krewinkel
and add a new `pandocVersion` value with type `Version`. This is consistent with the type used for `pandocTypesVersion` and allows to use the value where a Version type is required.
2022-09-27pandoc-cli: support `-E` flag in pandoc-luaAlbert Krewinkel
2022-09-27pandoc-cli: support "lua" and "serve" as commandsAlbert Krewinkel
Pandoc behaves like `pandoc-lua` and `pandoc-server` if the first argument is `lua` and `serve`, respectively.
2022-09-27pandoc-cli: update to hslua-cli-1.2Albert Krewinkel
2022-09-27pandoc-cli: Avoid the CPP language extensionAlbert Krewinkel
Alternative behavior for the *server* flag is implemented by using separate modules.
2022-09-26Add server flag to pandoc-cli.John MacFarlane
This allows the executable to be built without support for "server mode."
2022-09-23Use hslua-cli package for pandoc-lua interfaceAlbert Krewinkel
2022-09-22Make pandoc behave like a Lua interpreter when called as `pandoc-lua`. (#8311)Albert Krewinkel
2022-09-22Split pandoc-server, pandoc-cli into separate packages. (#8309)John MacFarlane
This also removes the unnecessary Setup.hs from pandoc. Cabal does not need this with build-type 'simple'.