| Age | Commit message (Collapse) | Author |
|
The substantive change here is the `-strue` will now work
instead of being interpreted as `-s -true`.
This is somewhat ad hoc, but I don't think we'll ever have
an output format named `rue`, so it's probably okay.
|
|
Previously if you did `pandoc -s -t bbb`, it would give you
an error about the missing bbb template instead of saying that
it's not a supported output format.
|
|
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.
|
|
Thanks @fsoedjede
|
|
|
|
|
|
It takes a boolean argument, and now that all of our boolean
flags take such an argument, we can make this one optional for
consistency.
|
|
Always give the name of the relevant argument.
See #8879.
|
|
The AsciiDoc community now regards the dialect parsed by `asciidoctor`
as the official AsciiDoc syntax, so it should be the target of our
`asciidoc` format.
Closes #8936.
The `asciidoc` output format now behaves like `asciidoctor` used to.
`asciidoctor` is a deprecated synonynm. For the old `asciidoc` behavior
(targeting the Python script), use `asciidoc_legacy`.
The templates have been consolidated. Instead of separate
`default.asciidoctor` and `default.asciidoc` templates, there is
just `default.asciidoc`.
Text.Pandoc.Writers.AsciiDoc API changes:
- `writeAsciiDoc` now behaves like `writeAsciiDoctor` used to.
- `writeAsciiDoctor` is now a deprecated synonym for `writeAsciiDoc`.
- New exported function `writeAsciiDocLegacy` behaves like
`writeAsciDoc` used to.
|
|
Default is true if no value is specified, so this is fully backwards-compatible.
Closes #8788.
|
|
(That is, whenever we have the filename and are in a
PandocMonad instance.)
This will lead to more informative error messages for UTF8
encoding, indicating the file path and byte offset where the
error occurs. Closes #8884.
|
|
This is like `Text.Pandoc.UTF8.toText`, except:
- it takes a file path as first argument, in addition to
bytestring contents
- it raises an informative error with source position if
the contents are not UTF8-encoded
[API change]
This replaces `utf8ToText` in `Text.Pandoc.App.Input`.
See #8884.
|
|
This wasn't implemented before due to an oversight. Closes #8908.
|
|
|
|
This prevented users to use custom writers with uppercase characters in
their filenames. Format-normalization, including lower-casing of
format identifiers, happens during format parsing.
|
|
* T.P.Format: export `formatFromFilePaths` [API change]
* Lua: add function `pandoc.format.from_path`
* Update lua-filters.md
* The old T.P.App.FormatHeuristics module has been removed.
This is an alternative to #8693.
|
|
* Add `--chunk-template` CLI option, allowing more control over the
chunk filenames in chunked HTML output.
* Text.Pandoc.App: Add `optChunkTemplate` constructor to Opt [API change].
* Text.Pandoc.Options: add `writerChunkTemplate` contsructor to
WriterOptions [API change].
* Text.Pandoc.Chunks: add Data, Typeable, Generic instances for
PathTemplate.
|
|
Closes #8586.
|
|
`pandoc-version`, `outputfile`, `title-prefix`, `epub-cover-image`,
`curdir`, `dzslides-core` can be overridden by `--variable` on the
command line.
Previously they would create lists in the template Context,
which is not desirable.
|
|
Rationale: we need this splitting level now not just in
EPUB but in chunked HTML.
`--epub-chapter-level` will still function as a deprecated
synonynm. `epub-chapter-level` will also continue to work in
defaults files, ande `epub_chapter_level` will still work for
Lua marshalling.
[API changes]
Text.Pandoc.App.Opt: remove `optEpubChapterLevel`, add
`optSplitLevel`.
Text.Pandoc.Options: remove `writerEpubChapterLevel`, add
`writerSplitLevel`.
|
|
- Add module Text.Pandoc.Writers.ChunkedHTML,
exporting writeChunkedHtml [API change].
- Revised API for Text.Pandoc.Chunks.
`chunkNext`, `chunkPrev`, `chunkUp` are now
just `Maybe Chunk`.
- Fix assignment of navigation elements of Chunks.
- Strip off anchor portion of next and prev links.
- Remove Ord instances for SecInfo, Chunk.
- Derive Show, Eq, Generic for ChunkDoc.
- Add `chunkSectionNumber`, `chunkUnlisted`.
- Automatically unwrap the zip to a directory
if an extensionless output file specified.
- Incorporate images with relative paths below working dir.
|
|
|
|
The new type CustomComponents is exported from T.P.Scripting, and the
ScriptEngine fields are changed. Instead of separate fields for custom
readers and writers, we now have a single function that loads any number
of "components" from a script: these may be custom readers, custom
writers, templates for writers, or extension configs. (Note: it's
possible to have a custom reader and a custom writer for a format
together in the same file.)
Pandoc now checks the folder `custom` in the user's data directory for a
matching script if it can't find one in the local directory. Previously,
the `readers` and `writers` data directories were search for custom
readers and writers, respectively. Scripts in those directories must be
moved to the `custom` folder.
Custom readers used to implement a fallback behavior that allowed to
consume just a string value as input to the `Reader` function. This has
been removed, the first argument is now always a list of sources. Use
`tostring` on that argument to get a string.
Closes #8417.
Signed-off-by: Albert Krewinkel <albert@zeitkraut.de>
|
|
|
|
A new error `PandocNoTemplateError` (code 87) is thrown if a template is
required but cannot be found.
|
|
New command line option: `--epub-title-page=true|false`.
New `writerEpubTitlePage` field on `WriterOptions` [API change].
New `optEpubTitlePage` field on `Opts` [API change].
Closes #6097.
|
|
fix case where the links are URL-encoded, e.g. with `%20`.
Closes #8467.
|
|
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 will no doubt produce a bunch of warnings and hence CI
failures, which we'll need to work around with explicit imports.
|
|
|
|
T.P.Extensions [API change]:
+ Add CustomExtension constructor to Extension.
+ Remove Bounded, Enum instances for Extension.
+ Add `extensionsToList` function.
+ Revise `readExtension` so it can handle CustomExtension, and so
that it returns a Text rather than Maybe Text.
+ Add `showExtension`.
T.P.Format:
+ Revise error checking to handle CustomExtension.
|
|
This was only used in one place, and can be replaced with simpler
code.
|
|
This is just `nubOrd` from Data.Containers.ListUtils.
|
|
|
|
|
|
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).
|
|
|
|
Custom writers can define a default template via a global `Template`
function; the data directory is no longer searched for a default
template.
Writer authors can restore the old lookup behavior with
``` lua
Template = function ()
local template
return template.compile(template.default(PANDOC_SCRIPT_FILE))
end
```
|
|
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.
|
|
The default template of a custom writer `/path/to/my-writer.lua` is
expected in the `templates/default.my-writer.lua` data file. Note that
templates are *not* applied automatically to the output of custom
writers; custom writer authors must ensure that the template is applied
if one is present in the writer options.
Closes: #8137
|
|
Custom writers can define the extensions that they support via the
global `writer_extensions`. The variable's value must be a table with
all supported extensions as keys, and their default status as values.
E.g., the below specifies that the writer support the extensions `smart`
and `sourcepos`, but only the `smart` extension is enabled by default:
writer_extensions = {
smart = true,
sourcepos = false,
}
|
|
The functions now take a `FlavoredFormat` instead of a text argument.
|
|
The module provides functions and types for format spec parsing and
processing.
The function `parseFormatSpec` was moved from Text.Pandoc.Extensions to
the new module and renamed to `parseFlavoredFormat`. It now operates in
a PandocMonad and is based on the updated types.
|
|
This is still an unexported internal module.
Export `urlEncode`, `escapeURI`, `isURI`, `schemes`, `uriPathToPath`.
Re-export `escapeURI` and `isURI` from T.P.Shared (as they
were exported before); drop exports of `schemes` and `uriPathToPath`
[API change].
With this change, T.P.Class no longer depends on T.P.Shared.
|
|
This makes T.P.Class more self-contained, and suitable for extraction
into a separate package if desired.
[API changes]
- T.P.Data is now an exported module, providing `readDataFile`,
`readDefaultDataFile` (both formerly provided by T.P.Class),
and also `getDataFileNames` (formerly unexported in
T.P.App.CommandLineOptions).
- T.P.Translations is now an exported module (along with
T.P.Translations.Types), providing `readTranslations`,
`getTranslations`, `setTranslations`, `translateTerm`,
`lookupTerm`, `readTranslations`, `Term(..)`, and `Translations`.
- T.P.Class: `readDataFile`, `readDefaultDataFile`, `setTranslations`,
and `translateTerm` are no longer exported.
`checkUserDataDir` is now exported.
- Text.Pandoc now exports Text.Pandoc.Data and `setTranslations`
and `translateTerm`.
|
|
The `T.P.Lua.writeCustom` function changed to allow either a TextWriter
or ByteStringWriter to be returned. The global variables
`PANDOC_DOCUMENT` and `PANDOC_WRITER_OPTIONS` are no longer set when the
writer script is loaded. Both variables are still set in classic writers
before the conversion is started, so they can be used when they are
wrapped in functions.
|
|
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.
|
|
|
|
|
|
|