Age | Commit message (Collapse) | Author | Files | Lines |
|
For YAML metadata parsing. A step in the direction of #5914.
No API change.
|
|
`Nothing` means: nothing specified.
`Just []` means: an empty list specified (e.g. in defaults).
Potentially these could lead to different behavior: see #5888.
|
|
PR #5884.
+ Use pandoc-types 1.20 and texmath 0.12.
+ Text is now used instead of String, with a few exceptions.
+ In the MediaBag module, some of the types using Strings
were switched to use FilePath instead (not Text).
+ In the Parsing module, new parsers `manyChar`, `many1Char`,
`manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`,
`mantyUntilChar` have been added: these are like their
unsuffixed counterparts but pack some or all of their output.
+ `glob` in Text.Pandoc.Class still takes String since it seems
to be intended as an interface to Glob, which uses strings.
It seems to be used only once in the package, in the EPUB writer,
so that is not hard to change.
|
|
Previously, if a document contained two YAML metadata blocks
that set the same field, the conflict would be resolved in favor
of the first. Now it is resolved in favor of the second (due to
a change in pandoc-types).
This makes the behavior more uniform with other things in pandoc
(such as reference links and `--metadata-file`).
|
|
This changes `applyFilters` from Text.Pandoc.Filter so
that it does a left fold rather than a right fold, applying
the filters in the order listed. [behavior change]
The command-line arguments are accumulated in order instead
of reverse order.
A first step twoards #5881.
|
|
PDF output will not be output to the terminal, but can be
sent to stdout using either `-o -` or a pipe.
The intermediate format will be determined based on
the setting of `--pdf-engine`.
Closes #5751.
|
|
- Add FromYAML instances to Opt and to all subsidiary types.
- Remove the use of HsYAML-aeson, which doesn't give good
position information on errors.
- Rename some fields in Opt to better match cli options or
reflect what the ycontain [API change]:
+ optMetadataFile -> optMetadataFiles
+ optPDFEngineArgs -> optPDFEngineOpts
+ optWrapText -> optWrap
- Add IpynbOutput enumerated type to Text.Pandoc.App.Opts.
Use this instead fo a string for optIpynbOutput.
- Add FromYAML instance for Filter in Text.Pandoc.Filters.
With these changes parsing of defaults files should be
complete and should give decent error messages.
Now (unlike before) we get an error if an unknown field
is used.
|
|
on conflicting fields. This changes earlier behavior (but not in
a release), where first took precedence.
Note that this may seem inconsistent with the behavior of
multiple YAML blocks within a document, where the first takes
precedence. Still, it is convenient to be able to override
defaults with options later on the command line.
|
|
This will allow to: and from: in defaults.
|
|
[API change]
The current behavior of the `--metadata` option stays the same.
|
|
We now just use optShiftHeadingLevelBy, to avoid redundancy.
|
|
to match the option.
|
|
+ An error is now raised if you try to specify (enable or
disable) an extension that does not affect the given
format, e.g. `docx+pipe_tables`.
+ The `--list-extensions[=FORMAT]` option now lists only
extensions that affect the given FORMAT.
+ Text.Pandoc.Error: Add constructors `PandocUnknownReaderError`,
`PandocUnknownWriterError`, `PandocUnsupportedExtensionError`.
[API change]
+ Text.Pandoc.Extensions now exports `getAllExtensions`,
which returns the extensions that affect a given format
(whether enabled by default or not). [API change]
+ Text.Pandoc.Extensions: change type of `parseFormatSpec`
from `Either ParseError (String, Extensions -> Extensions)`
to `Either ParseError (String, [Extension], [Extension])`
[API change].
+ Text.Pandoc.Readers: change type of `getReader` so it returns
a value in the PandocMonad instance rather than an Either
[API change]. Exceptions for unknown formats and unsupported
extensions are now raised by this function and need not be handled by
the calling function.
+ Text.Pandoc.Writers: change type of `getWriter` so it returns
a value in the PandocMonad instance rather than an Either
[API change]. Exceptions for unknown formats and unsupported
extensions are now raised by this function and need not be handled by
the calling function.
|
|
|
|
Deprecate --base-heading-level.
The new option does everything the old one does, but also
allows negative shifts. It also promotes the document
metadata (if not null) to a level-1 heading with a +1 shift,
and demotes an initial level-1 heading to document metadata
with a -1 shift. This supports converting documents that
use an initial level-1 heading for the document title.
Closes #5615.
|
|
add UnusualConversion to LogMessage [API change]
|
|
|
|
Changed optMetadataFile from `Maybe FilePath` to `[FilePath]`. This allows
for multiple YAML metadata files to be added. The new default value has
been changed from `Nothing` to `[]`.
To account for this change in `Text.Pandoc.App`, `metaDataFromFile` now
operates on two `mapM` calls (for `readFileLazy` and `yamlToMeta`) and a fold.
Added a test (command/5700.md) which tests this functionality and
updated MANUAL.txt, as per the contributing guidelines.
With the current behavior, using `foldr1 (<>)`, values within files
specified first will be used over those in later files. (If the reverse
of this behavior would be preferred, it should be fixed by changing
foldr1 to foldl1.)
|
|
This reverts commit 87ce1ffbd97f6cb2785f9fbf05f68d3185f50675.
This change caused a problem on Windows that we didn't have
before; this needs looking into.
https://ci.appveyor.com/project/jgm/pandoc/build/job/fxq96log042df8dk
.\pandoc.exe -s --toc ..\MANUAL.txt -o MANUAL.html
pandoc.exe: MANUAL.html: commitAndReleaseBuffer: invalid argument (invalid character)
Command exited with code 1
|
|
|
|
|
|
|
|
|
|
[API change]
Issue this warning when we're falling back to markdown or
html because we don't recognize the extension of the input or
output files.
|
|
Internal change. This will make it easier to emit messages
when we're guessing at a format.
|
|
Previously if you used `--self-contained` with `html-smart` or
`html+smart`, it wouldn't work.
|
|
Closes #5422.
|
|
Instead of `$HOME/.pandoc`, the default user data directory is
now `$XDG_DATA_HOME/pandoc`, where `XDG_DATA_HOME` defaults to
`$HOME/.local/share` but can be overridden by setting the environment
variable.
If this directory is missing, then `$HOME/.pandoc` is searched
instead, for backwards compatibility. However, we recommend
moving local pandoc data files from `$HOME/.pandoc` to
`$HOME/.local/share/pandoc`.
On Windows the default user data directory remains the same.
Closes #3582.
|
|
The haddock module header contains essentially the
same information, so the boilerplate is redundant and
just one more thing to get out of sync.
|
|
Add ReaderOptions parameter to yamlToMeta [API change].
fixes #5272
|
|
Add command line option `--ipynb-output=all|none|best`.
Closes #5339.
|
|
Quite a few modules were missing copyright notices.
This commit adds copyright notices everywhere via haddock module
headers. The old license boilerplate comment is redundant with this and has
been removed.
Update copyright years to 2019.
Closes #4592.
|
|
Previously we used HsYAML's decodeStrict to recognize
boolean values (treating everything else as a string).
This caused problems relating to hvr/HsYAML#7.
We now just check for the recognized boolean values
`true|True|TRUE|false|False|FALSE`, and avoid using
HsYAML.
Closes #5177.
|
|
Give the filename and the byte offset.
Closes #4765.
|
|
Format guessing is used for input and output options and should be
shared.
|
|
The new Opt module has only a few dependencies. This is important for
compile-times during development, as Template Haskell containing modules
are be recompiled whenever a (transitive) dependency changes.
|
|
|
|
|
|
We now ensure that if someone tries to convert a file
for a format that has a pandoc writer but not a reader,
it won't just default to markdown.
|
|
Closes #4836.
|
|
We need it for tables.
|
|
|
|
Now the `write*` functions for Docbook, HTML, ICML, JATS,
Man, Ms, OPML are sensitive to `writerPreferAscii`. Previously
the to-ascii translation was done in Text.Pandoc.App, and
thus not available to those using the writer functions
directly.
In addition, the LaTeX writer is now sensitive to
`writerPreferAscii` and to `--ascii`. 100% ASCII
output can't be guaranteed, but the writer will use
commands like `\"{a}` and `\l` whenever possible,
to avoid emiting a non-ASCII character.
A new unexported module, Text.Pandoc.Groff, has been
added to store functions used in the different groff-based
writers.
|
|
closes #1960
API change: Text.Pandoc.Readers.Markdown exports now `yamlToMeta`
|
|
closes #1155 (again)
|
|
Under version 2.2.1 and prior pandoc found latex templates in the
templates directory under the data directory, but this no longer
works in 2.2.2.
MANUAL says: "If the template is not found, pandoc will search for it in
the templates subdirectory of the user data directory (see `--data-dir`)."
This commit fixes the regression, which stems from 07bce91.
Closes #4777.
|
|
yaml wraps a C library; HsYAML is pure Haskell.
Closes #4747. Advances #4535.
|
|
|
|
|
|
|