The Lua interpreter no longer terminates when called with `-v` or
`--version` arguments, thus improving compatibility with the default
`lua` interpreter program.
This properly escapes hyphens.
Also, we get proper version numbers in pandoc-server and pandoc-lua.
The Makefile has already been modified to ensure that all three
man pages will be regenerated when there is a new version of pandoc.
Henceforth pandoc-cli's version will be synchronized with pandoc's, and
pandoc-cli will depend on an exact pandoc version.
This will avoid confusion by ensuring that `cabal install pandoc-cli-X.Y.Z`
installs pandoc version X.Y.Z. It will make things more straightforward
for upstream packagers (see #9232).
Note also that the man pages included in this package are for a specific
pandoc version.
This scheme does not follow the Haskell PVP, but that should cause no
harm, because this package does not expose a library.
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.
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]
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).