Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Using `map toUpper` to capitalise text is wrong, as e.g.
“Straße” should be converted to “STRASSE”, which is 1 character
longer. This commit adds a `capitalize` function and replaces
2 identical implementations in different modules (`toCaps` and
`capitalize`) with it.
|
|
Strip a fragment like `?#iefix` from the extension before doing
the mime lookup.
|
|
* More consistent logic: absolute URIs are fetched from the net;
other things are treated as relative URIs if sourceURL is a Just,
otherwise as file paths.
* We escape characters that are not allowed in URIs before trying
to parse them (e.g. '|', which often occurs in the wild).
* When treating relative paths as local file paths, we drop
any fragment or query. This is useful e.g. when you've downloaded
web fonts locally, but your source still contains the original
relative URLs.
Together with the previous commit, this should close #1477.
|
|
Moved `MediaBag` definition and functions from Shared:
`lookupMedia`, `mediaDirectory`, `insertMedia`, `extractMediaBag`.
Removed `emptyMediaBag`; use `mempty` instead, since `MediaBag`
is a Monoid.
|
|
Shared now exports functions for interacting with a MediaBag:
- `emptyMediaBag`
- `lookuMedia`
- `insertMedia`
- `mediaDirectory`
- `extractMediaBag`
|
|
|
|
The MediaBag is thread through from the reader, with no need
to extract to files.
|
|
|
|
|
|
This will allow us to put a MediaBag in WriterOptions.
|
|
API change.
|
|
|
|
Closes #1452. Added test.
|
|
sections."
This reverts commit 2a46042661a088096ac54097db5cd3674438bb63.
|
|
They were previously numbered, starting from the previous numbered
section, which was wrong.
|
|
Close #1427.
|
|
|
|
|
|
API change (addition of exported function).
|
|
|
|
|
|
* Added normalizeInlines, normalizeBlocks.
* Type signature is now more narrow, `Pandoc -> Pandoc` instead of
`Data a :: a -> a`. Some users may need to change their uses of
`normalize` to the newly exported `normalizeInlines` or
`normalizeBlocks`.
|
|
Generalised and move the extractSpaces function from `HTML.hs` to
`Shared.hs` so that the docx reader can also use it.
|
|
API change (adds export).
|
|
* http-conduit flag is now https.
* Instead of http-conduit, we depend on http-client and http-client-tls.
|
|
|
|
|
|
Org reader improvements
|
|
The function `compactify'DL`, used to change the final definition item of a
definition list into a `Plain` iff all other items are `Plain`s as well, is
useful in many parsers and hence moved into Text.Pandoc.Shared.
|
|
9 and numbers ending in 9 would end with "IXIV."
Thanks to Jesse Rosenthal. Closes #1249.
|
|
Note: proxies with non-root paths are not supported,
because of limitations in http-conduit.
Closes #1211.
|
|
|
|
Replaces long conditional chains with calls to `elem` and `notElem`.
|
|
Replace `and . map` with `all`.
|
|
This should address #1080, but further testing on Windows is needed
before we can close the bug.
|
|
|
|
Previously the base-64 encoded bytestring was returned.
We now decode it so it's a proper image!
This should fix parsing of data: URLs.
|
|
It allows fragments identifiers.
|
|
|
|
Also documented this in README.
|
|
This reverts commit 19591df739a6c50a3d0a9af55ba90b883264b21d.
This change didn't work; query has already written the contents
of the note by the time it gets to Note.
|
|
That is usually the right thing to do for section labels, etc.
|
|
Listing the full path can confuse people who are using
`--self-contained`: they might have intended the file to be
found locally. So now we just list the data file name.
|
|
Previously we used to store the directory of the first input file,
even if it was local, and used this as a base directory for
finding images in ODT, EPUB, Docx, and PDF.
This has been confusing to many users. It seems better to look for
images relative to the current working directory, even if the first
file argument is in another directory.
writerSourceURL is set to 'Just url' when the first command-line
argument is an absolute URL. (So, relative links will be resolved
in relation to the first page.) Otherwise, 'Nothing'.
The ODT, EPUB, Docx, and PDF writers have been modified accordingly.
Note that this change may break some existing workflows. If you
have been assuming that relative links will be interpreted relative
to the directory of the first file argument, you'll need to
make that the current directory before running pandoc.
Closes #942.
|
|
They are significantly faster.
|
|
|
|
|
|
* In Shared, openURL and fetchItem now return an Either, for
better error handling. (API change.)
* Better error message when fetching a URL fails with
`--self-contained`.
* EPUB writer: If resource not found, skip it, as in Docx writer.
* Closes #916.
|