Commit graph

14545 commits

Author SHA1 Message Date
John MacFarlane
4a7a0cff29 ImageSize: Add Tiff constructor for ImageType.
[Minor API change]

This allows pandoc to get size information from tiff images.
Closes #7405.
2021-06-23 11:39:50 -07:00
John MacFarlane
235cdea629 reveal.js writer: Go back to setting boolean values for variables.
In a previous commit we used strings because boolean False
wouldn't render as `false`. This is changed in the dev
version ofdoctemplates, so we can go back to the more
straightforward approach.
2021-06-23 09:54:14 -07:00
John MacFarlane
7dcf727382 Use dev version of doctemplates. 2021-06-22 23:58:24 -07:00
John MacFarlane
227f675cc4 Update changelog. 2021-06-22 11:22:53 -07:00
John MacFarlane
1b07997f4a Fix regression with comment-only YAML metadata blocks.
Closes #7400.
2021-06-22 09:55:50 -07:00
John MacFarlane
086790d986 Fix unneeded import 2021-06-22 09:49:24 -07:00
John MacFarlane
8eed5b90d0 LaTeX writer: add strut at end of minipage if it contains...
line breaks.  Without them, the last line is shorter
than it should be, at least in some cases.
2021-06-21 23:33:00 -07:00
John MacFarlane
9867231779 Revert "LaTeX writer: put a strut after a line break (\\)."
This reverts commit e2a7ecb5f7.
2021-06-21 23:19:40 -07:00
John MacFarlane
e2a7ecb5f7 LaTeX writer: put a strut after a line break (\\).
This ensures that we have proper spacing before the next
line (which might e.g. be a table bottom border).
This gives better results in cases like test/command/7272.md.
2021-06-21 23:17:43 -07:00
John MacFarlane
0352f7845b Improve emailAddress in Text.Pandoc.Parsing.
Previously the parser would accept characters in domains
that are illegal in domains, and this sometimes caused it
to gobble bits of the following text.

Closes #7398.

Note that this change, by itself, caused some txt2tag reader
tests to fail. txt2tags allows bare email addresses with
a following form query.  So, in addition to the change
to emailAddress, we modify the txt2tags parser so it can
still handle these cases.
2021-06-21 22:35:07 -07:00
John MacFarlane
2ef2049b4e Update command test for change to LaTeX LineBreak handling. 2021-06-21 22:34:38 -07:00
John MacFarlane
ed3974a254 LaTeX writer: always use a minipage for cells with line breaks...
if width information is available.  Otherwise the way we treat them can
lead to content that overflows a cell.

Closes #7393.
2021-06-21 18:25:36 -07:00
John MacFarlane
eee648447a LaTeX writer: Use \strut instead of ~ before \\ in empty line. 2021-06-21 18:25:07 -07:00
John MacFarlane
14b2eb2aeb reveal.js writer: better handling of options.
Previously it was impossible to specify false values for
options that default to true; setting the option to false
just caused the portion of the template setting the option
to be omitted.

Now we prepopulate all the variables with their default
values, including them unconditionally and allowing them
to be overridden.
2021-06-21 16:40:52 -07:00
John MacFarlane
a39313eddb Fix test for #7397 2021-06-21 09:30:23 -07:00
John MacFarlane
82ad855f38 Markdown writer: Fix regression in code blocks with attributes.
Code blocks with a single class but nonempty attributes
were having attributes drop as a result of #7242.

Closes #7397.
2021-06-21 08:49:00 -07:00
John MacFarlane
0c4ed0045a Bump to 2.14.0.3, update changelog, require latest skylighting. 2021-06-20 19:25:43 -07:00
John MacFarlane
39d019ca73 Use lts-18.0 stack resolver. 2021-06-20 18:17:38 -07:00
John MacFarlane
a8556ac06c Require commonmark 0.2.1. 2021-06-20 17:46:47 -07:00
John MacFarlane
3fb5499dd6 insertMediaBag: ensure we get sane mediaPath for URLs.
Long URLs cannot be treated as mediaPaths, but System.FilePath's
`isRelative` often returns True for them.  So we add a check
for an absolute URL.  We also ensure that extensions are derived
only from the path portion of URLs (previously a following query
was being included).

Closes #7391.
2021-06-18 13:19:24 -07:00
John MacFarlane
961268446c Rephrase section on unsafe HTML in manual. 2021-06-14 12:36:05 -07:00
John MacFarlane
62533053da
Add link to the manual's note on security to SECURITY.md. 2021-06-14 10:35:29 -07:00
John MacFarlane
115962079e
Create SECURITY.md 2021-06-14 09:15:23 -07:00
John MacFarlane
2d966c4c2d Update changelog date. 2021-06-13 09:53:01 -07:00
John MacFarlane
7ab5c2057b Update changelog. 2021-06-12 14:02:00 -07:00
John MacFarlane
cfa26e3ca0 Docx reader: handle absolute URIs in Relationship Target.
Closes #7374.
2021-06-12 13:56:09 -07:00
John MacFarlane
ea53a1dc5c Markdown writer: allow pipe_tables to be disabled for commonmark...
(commonmark_x, gfm).  Closes #7375.
2021-06-12 10:20:19 -07:00
John MacFarlane
b0cd6c6224 Fix regression in citeproc processing.
If inline references are used (in the metadata `references` field),
we should still only include in the bibliography items that are
actually cited -- unless `nocite` is used.

Closes #7376.
2021-06-12 10:16:44 -07:00
John MacFarlane
ea88979aa2 Make parts of the bug report templates HTML comments. 2021-06-11 13:29:21 -07:00
John MacFarlane
a916c4bce4 Revise issue report "dashboard." 2021-06-11 13:15:22 -07:00
John MacFarlane
b01a7aa66c Add note about asking questions to bug report template. 2021-06-11 09:53:07 -07:00
John MacFarlane
55e9ca7c78 Fix line breaks in issue templates. 2021-06-11 09:51:19 -07:00
John MacFarlane
2390f58a07 Fix link to contributing guidelines. 2021-06-11 09:50:01 -07:00
John MacFarlane
01bae106bf Add contributing guidelines to issue menu. 2021-06-11 09:47:17 -07:00
John MacFarlane
1abac223c2 More honing of issue templates. 2021-06-11 09:45:13 -07:00
John MacFarlane
85f1e1f306 Remove pull requset template. 2021-06-11 09:39:27 -07:00
John MacFarlane
c9b354e15f Add pull request template. 2021-06-11 09:37:37 -07:00
John MacFarlane
6d471a4a28 Improve issue templates. 2021-06-11 09:37:27 -07:00
John MacFarlane
d46e0551fe Revert "Remove md versions of issue templates."
This reverts commit 61c0e0bbfb.
2021-06-11 09:17:59 -07:00
John MacFarlane
61c0e0bbfb Remove md versions of issue templates. 2021-06-11 09:15:22 -07:00
John MacFarlane
1fe07e6387 Update issue templates 2021-06-11 09:13:49 -07:00
John MacFarlane
8d1853bd36 Fancier issue templates.
Based on Doom Emacs's templates.
2021-06-11 09:06:47 -07:00
John MacFarlane
67b3c36a93 Bump to 2.14.0.2, update chaneglog and manual. 2021-06-10 22:47:53 -07:00
John MacFarlane
3776e828a8 Fix MediaBag regressions.
With the 2.14 release `--extract-media` stopped working as before;
there could be mismatches between the paths in the rendered document and
the extracted media.

This patch makes several changes (while keeping the same API).

The `mediaPath` in 2.14 was always constructed from the SHA1 hash of
the media contents.  Now, we preserve the original path unless it's
an absolute path or contains `..` segments (in that case we use a path
based on the SHA1 hash of the contents).

When constructing a path from the SHA1 hash, we always use the
original extension, if there is one. Otherwise we look up an
appropriate extension for the mime type.

`mediaDirectory` and `mediaItems` now use the `mediaPath`, rather
than the mediabag key, for the first component of the tuple.
This makes more sense, I think, and fits with the documentation
of these functions; eventually, though, we should rework the API so that
`mediaItems` returns both the keys and the MediaItems.

Rewriting of source paths in `extractMedia` has been fixed.

`fillMediaBag` has been modified so that it doesn't modify
image paths (that was part of the problem in #7345).

We now do path normalization (e.g. `\` separators on Windows) only
in writing the media; the paths are left unchanged in the image
links (sensibly, since they might be URLs and not file paths).

These changes should restore the original behavior from before 2.14.

Closes #7345.
2021-06-10 16:47:02 -07:00
John MacFarlane
aa79b3035c T.P.MIME, extensionFromMimeType: add a few special cases.
When we do a reverse lookup in the MIME table, we just get the
last match, so when the same mime type is associated with several
different extensions, we sometimes got weird results, e.g. `.vs`
for `text/plain`.  These special cases help us get the most standard
extensions for mime types like `text/plain`.
2021-06-10 16:36:54 -07:00
Albert Krewinkel
c7dd33d5aa
Docx writer: fix handling of empty table headers
A table header which does not contain any cells is now treated as an
empty header.

Fixes: #7369
2021-06-10 18:36:49 +02:00
Albert Krewinkel
55bcd4b4fb
Lua utils: fix handling of table headers in from_simple_table
Passing an empty list of header cells now results in an empty table
header.

Fixes: #7369
2021-06-10 18:36:49 +02:00
John MacFarlane
76e5f047b0 Citeproc: avoid duplicate classes and attributes on refs div. 2021-06-08 17:51:53 -07:00
Albert Krewinkel
e66960fe4f
using-the-pandoc-api.md: switch from String to Text
Fixed examples that would no longer compile with current library
versions, as the API now uses Text instead of String in most places.
2021-06-08 12:38:20 +02:00
Sebastian Humenda
39afd4297f Mention GladTeX for EPUB export
This updates the manual and the web site about the GladTeX usage.
2021-06-07 19:17:39 -06:00