Commit graph

11375 commits

Author SHA1 Message Date
John MacFarlane
ec89628984 Avoid a non-exhaustive pattern match. 2018-08-10 14:59:59 -07:00
John MacFarlane
9752dcd61a HTML writer: Don't prefix epub: attributes with data-. 2018-08-08 09:53:13 -07:00
John MacFarlane
6728049225 Bump to 2.2.3.2, update man page, changelog. 2018-08-07 09:30:34 -07:00
John MacFarlane
b76203ccf1 Markdown reader: Properly handle boolean values in YAML metadata.
This fixes a regression in 2.2.3, which cause boolean values to
be parsed as MetaInlines instead of MetaBool.

Note also an undocumented (but desirable) change in 2.2.3:
numbers are now parsed as MetaInlines rather than MetaString.

Closes #4819.
2018-08-07 09:26:58 -07:00
John MacFarlane
030e8969c7 Bump to 2.2.3.1, update man page and changelog. 2018-08-06 21:37:15 -07:00
John MacFarlane
94c3753c08 Fix parsing of embedded mappings in YAML metadata.
This fixes a regression in 2.2.3 which caused embedded mappings
(e.g. mappings in sequences) not to work in YAML metadata.

Closes #4817.
2018-08-06 12:32:04 -07:00
John MacFarlane
788ecf06f6 Update README.md. 2018-08-05 16:53:09 -07:00
John MacFarlane
d8a614d7bb Bump to 2.2.3, update changelog and man page. 2018-08-05 12:40:56 -07:00
John MacFarlane
581a3514ca RST reader: improve parsing of inline interpreted text roles.
* Use a Span with class "title-reference" for the default
  title-reference role.
* Use B.text to split up contents into Spaces, SoftBreaks, and Strs
  for title-reference.
* Use Code with class "interpreted-text" instead of Span and Str for
  unknown roles.  (The RST writer has also been modified to round-trip
  this properly.)
* Disallow blank lines in interpreted text.
* Backslash-escape now works in interpreted text.
* Backticks followed by alphanumerics no longer end interpreted text.

Closes #4811.
2018-08-05 09:56:43 -07:00
John MacFarlane
f7dc3e7487 Added test case for #4669 to repository. 2018-08-05 09:21:45 -07:00
Kirill Müller
5866892a9d Describe required space as breaking change (#4808) 2018-08-04 12:17:10 -07:00
Francesco Occhipinti
74a35b123c RST writer: allow images to be directly nested within links, closes #4810 (#4814) 2018-08-03 12:13:18 -07:00
Mauro Bieg
f83bdb1ac5 Better error message on -t pdf -o out.pdf (#4815)
closes #1155 (again)
2018-08-03 12:04:38 -07:00
Francesco Occhipinti
2661658a69 RST writer: use titleblock instead of title variable for title block
Closes #4803

After this commit use `$titleblock$` in order to get what was contained
in `$title$` before, that is a title and subtitle rendered according to
the official rST method:
http://docutils.sourceforge.net/docs/user/rst/quickstart.html#document-title-subtitle. from

With this commit, the `$title$` and `$subtitle$` metadata are available and they
simply carry the metadata values.  This opens up more possibilities in templates.
2018-08-01 12:32:16 -07:00
ChanHoHo
08694efd89 fix broken link for cabal-install (#4806) 2018-08-01 12:25:07 -07:00
John Muccigrosso
c279a2d332 MANUAL: Add beamer info for slide backgrounds (#4802) 2018-07-31 11:36:35 -07:00
John MacFarlane
d3d932f42c Markdown reader: allow unquoted numbers, booleans as YAML mapping keys.
Previously in 2.2.2 you could not do

    ---
    0: bar
    ...

but only

    ---
    '0': bar
    ...

With this change, both forms work.
2018-07-30 23:04:53 -07:00
John MacFarlane
cbb662ca07 Use YAML.decode rather than YAML.decodeStrict.
(Minor)
2018-07-30 22:02:59 -07:00
John MacFarlane
78dca68a0a DocBook reader: metadata handling improvements.
Now we properly parse title and subtitle elements that are
direct children of book and article (as well as children of
bookinfo, articleinfo, or info).

We also now use the "subtitle" metadata field for subtitles,
rather than tacking the subtitle on to the title.
2018-07-30 14:38:38 -07:00
Albert Krewinkel
fb94c0f6a1 Lua Utils module: add function blocks_to_inlines (#4799)
Exposes a function converting which flattenes a list of blocks into a
list of inlines. An example use case would be the conversion of Note
elements into other inlines.
2018-07-30 10:55:25 -07:00
Josh
bf56181204 Remove duplicate instruction (#4796) 2018-07-30 10:28:39 -07:00
danse
be2d7921cb RST reader: remove support for nested inlines.
RST does not allow nested emphasis, links, or other inline
constructs.

Closes #4581, double parsing of links with URLs as
link text.  This supersedes the earlier fix for #4581
in 6419819b46.

Fixes #4561, a bug parsing with URLs inside emphasis.

Closes #4792.
2018-07-24 15:35:50 -07:00
John MacFarlane
50e8c3b107 MediaWiki writer: Avoid extra blank line in tables with empty cells.
Note that the old output is semantically identical, but the
new output looks better.

Closes #4794.
2018-07-24 11:38:24 -07:00
Albert Krewinkel
4e899eb9c8
Org reader: fix parsers relying on parseFromString
Emphasis was not parsed when it followed directly after some block types
(e.g., lists).

The org reader uses a wrapper for the `parseFromString` function to
handle org-specific state. The last position of a character allowed
before emphasis was reset incorrectly in this wrapper. Emphasized text
was not recognized when placed directly behind a block which the reader
parses using `parseFromString`.

Fixes: #4784
2018-07-23 22:05:41 +02:00
John MacFarlane
a85877424b MANUAL: Clarify when csquotes is used in LaTeX writer.
Closes #4514.
2018-07-21 23:29:30 -07:00
John MacFarlane
ffed20cd71 MANUAL: Added commonmark to list of output formats where...
`raw_tex` has an effect.  See #4527.
2018-07-21 23:07:50 -07:00
John MacFarlane
6419819b46 RST reader: fix double-link bug.
Link labels containing raw URLs were parsed as autolinks,
but links within links are not allowed.

Closes #4581.
2018-07-21 22:53:04 -07:00
John MacFarlane
748aa920f6 Moved some beamer code in default.latex template.
This change allows beamer themes to change the
template and font (as Metropolis does).

Closes #4450.
2018-07-21 22:05:21 -07:00
John MacFarlane
e592904087 Make sure pandoc-windows-*.msi are deleted as intermediate files. 2018-07-19 22:43:19 -07:00
John MacFarlane
31ef9959b8 Update man page, changelog, authors. 2018-07-19 21:51:56 -07:00
John MacFarlane
34b229dd5a Fix for bug in parsing \include in markdown.
Starting in 2.2.2, everything after an `\input` (or `\include`)
in a markdown file would be parsed as raw LaTeX.
This commit fixes the issue and adds a regression test.

Closes #4781.
2018-07-19 17:44:16 -07:00
John MacFarlane
ac1a46b0cb rawLaTeXBlock: never retokenize macroDef. 2018-07-19 13:52:54 -07:00
Mauro Bieg
640814ac75 MANUAL: clarify gfm vs markdown_github (#4783) 2018-07-19 13:09:26 -07:00
Igor Khorlo
3efcf2c95a Add missing rollingLinks option to revealjs template (#4778)
Fix (add) the missing option 'rollingLinks' in reveal.js template.
2018-07-18 19:26:16 -07:00
John MacFarlane
eef8adaad8 Use 'keywords' instead of 'tags' in YAML metadata example.
Unlike `tags`, `keywords` is used in some of the writers
and default templates.

Closes #4779.
2018-07-18 19:24:45 -07:00
John MacFarlane
a007cd7ad6 Bump version to 2.2.2.1. 2018-07-18 19:23:22 -07:00
John MacFarlane
d7edfbdf4d Fix regression finding templates in user data directory.
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.
2018-07-18 18:55:12 -07:00
John MacFarlane
e1eeb663fc Update AUTHORS. 2018-07-15 22:04:45 -07:00
John MacFarlane
ebd79b6477 Minor cabal file changes.
Requested by 'stack upload.'
Different format for minimum cabal version.
Use of autogen-modules.
2018-07-15 21:43:54 -07:00
John MacFarlane
cccaf33e2d linux/Dockerfile: simplify and use new ghc 8.4.3. 2018-07-15 20:25:54 -07:00
John MacFarlane
75cf1f59ff Update changelog. 2018-07-15 16:09:11 -07:00
John MacFarlane
af445b34d8 Make markdown and github writers respect the emoji extension. 2018-07-15 16:02:46 -07:00
Anders Waldenborg
ec30fb37c1 Wrap emojis in span nodes (#4759)
Text.Pandoc.Emoji now exports `emojiToInline`, which returns a Span inline containing the emoji character and some attributes with metadata (class `emoji`, attribute `data-emoji` with emoji name).  Previously, emojis (as supported in Markdown and CommonMark readers, e.g "😄")
were simply translated into the corresponding unicode code point.  By wrapping them in Span
nodes, we make it possible to do special handling such as giving them a special font
in HTML output.  We also open up the possibility of treating them differently when the
`--ascii` option is selected (though that is not part of this commit).

Closes #4743.
2018-07-15 15:14:40 -07:00
John MacFarlane
ef07db6cef Small edits in changelog. 2018-07-15 15:05:05 -07:00
John MacFarlane
67f7cec439 Update man page. 2018-07-15 14:42:58 -07:00
John MacFarlane
f44be8c08f Bump to 2.2.2 and update changelog. 2018-07-15 13:44:43 -07:00
John MacFarlane
1579e57833 Support abbreviated units for siunitx (#4773). 2018-07-15 13:35:37 -07:00
John MacFarlane
339a9e1b8b LaTeX reader: be more forgiving in key/value option parsing.
We now allow arbitrary LaTeX values.

This helps with #4761. The `\maxwidth` is still not
propagated to the latex destination, but at least we don't
choke on parsing.
2018-07-15 12:53:42 -07:00
John MacFarlane
582b4afd0e appveyor: fixed use of --stack-yaml. 2018-07-14 18:04:26 -07:00
John MacFarlane
482a5874e9 appveyor: try using lts-11. 2018-07-14 17:51:46 -07:00