Commit graph

11863 commits

Author SHA1 Message Date
John MacFarlane
eed4514c4c Tweak travis for ghc 8.6.1. 2018-10-14 00:01:24 -07:00
Albert Krewinkel
49544069a2 Custom writer: give full access to doc in optional Setup function (#4967)
Custom writers can specify an optional `Setup` function. The function
takes the full Pandoc document as input and should not return any value.
Users can use this function to configure the writer depending on the
given document's content or its metadata.

data/sample.lua: add sample use of Setup function.
The change allows to control the image format used to encode the image
produced from dot code.

Closes #4957
2018-10-13 23:20:29 -07:00
John MacFarlane
8cee5b183e Travis: add ghc 8.6.1 build. 2018-10-13 23:13:53 -07:00
John MacFarlane
2018f41193 Update benchmarks for ghc 8.6.1. 2018-10-13 23:13:53 -07:00
John MacFarlane
275594f7f7 Makefile: added full-cabal target.
Also, use cabal-new configure in quick-cabal and full-cabal.
2018-10-13 23:13:53 -07:00
John MacFarlane
c86e3d2b6f Makefile: make trypandoc, benchmarks in quick-cabal target. 2018-10-13 23:13:53 -07:00
Yan Pas
3fed62611e tests, commented debug functions 2018-10-14 00:57:15 +03:00
Albert Krewinkel
273d4dfcfa
data/sample.lua: replace custom pipe function with pandoc.utils.pipe 2018-10-13 20:54:47 +02:00
John MacFarlane
78871c9b96 Use pandoc-citeproc 0.14.6. 2018-10-13 09:37:45 -07:00
Albert Krewinkel
418f6e093c
Lua filter docs: add documentation for Element/Sec 2018-10-13 16:25:54 +02:00
Albert Krewinkel
d126c26dd5
Lua filter internals: push Shared.Element as userdata
Hierarchical Elements were pushed to Lua as plain tables. This is
simple, but has the disadvantage that marshaling is eager: all child
elements will be marshaled as part of the object. Using a Lua userdata
object instead allows lazy access to fields, causing content marshaling
just (but also each time) when a field is accessed. Filters which do not
traverse the full element contents tree become faster as a result.
2018-10-13 14:57:20 +02:00
Albert Krewinkel
3db9e15689
Lua filters: push ListAttributes via constructor
This ensures that ListAttributes, as present in OrderedList elements,
have additional accessors (viz. *start*, *style*, and *delimiter*).
2018-10-12 21:13:44 +02:00
Albert Krewinkel
1ac87b487f
Lua filter docs: document list attributes 2018-10-11 22:30:40 +02:00
Albert Krewinkel
5f6f2c69f5
data/pandoc.lua: add datatype ListAttributes
Make ListAttributes a datatype. The type is similar to Attr.
2018-10-11 22:28:24 +02:00
Albert Krewinkel
484056a4cd
Lua filter docs: document fields of Citation objects 2018-10-11 21:25:26 +02:00
Albert Krewinkel
2e63e2f2bc
Lua filter docs: document fields of inline objects 2018-10-11 20:51:54 +02:00
John MacFarlane
f5c64c3060 HTML reader: fix htmlTag and isInlineTag to accept processing instructions.
Fixes regression #3123 (since 2.0). Added regression test.
2018-10-11 09:58:25 -07:00
Alexander Krotov
3e04c2f3af Muse reader internals: don't use "choice" with static list 2018-10-11 16:43:31 +03:00
Alexander Krotov
4494761640 Muse reader: use indentWith to parse indentation 2018-10-11 16:41:12 +03:00
Alexander Krotov
a9c69b20c5 Muse reader: move museInPara from state to environment 2018-10-11 16:39:03 +03:00
Evan Pratten
93a6d2945f INSTALL.md: Add chromeos install instructions (#4958) 2018-10-10 17:23:30 -07:00
Alexander Krotov
2aa417a2e5 Pandoc.Parsing: rewrite nonspaceChar using noneOf 2018-10-10 18:53:01 +03:00
Alexander Krotov
8d959179f9 Vimwiki reader: get rid of F, runF and stateMeta' in favor of stateMeta 2018-10-10 12:26:29 +03:00
Alexander Krotov
0a7650f87b Muse reader internals: merge link and explicit link parsers into one function 2018-10-10 11:35:00 +03:00
Alexander Krotov
6b8fd99dbd Test that Muse reader can parse code with = sign inside
(fixed by previous commit)
2018-10-10 03:27:36 +03:00
Alexander Krotov
36c763a647 Muse reader: rewrite code parser in applicative style 2018-10-10 03:23:08 +03:00
Alexander Krotov
d3b2161bd1 Muse reader: fix parsing of empty cells 2018-10-10 01:48:58 +03:00
Alexander Krotov
7556dc9e49 Reimplement mapLeft using Bifunctor.first 2018-10-10 01:26:50 +03:00
Alexander Krotov
2537c338fa Muse reader: simplify table parsing 2018-10-10 01:19:52 +03:00
Yan Pas
07b4d7b297 posix man files parsed successfully 2018-10-09 23:59:12 +03:00
John MacFarlane
259c356435 Added docx/docPropos/custom.xml to cabal data-files. 2018-10-09 11:15:07 -07:00
John MacFarlane
30033f417f Docx writer: added framework for custom properties.
So far, we don't actually write any custom properties,
but we have the infrastructure to add this.

See #3034.
2018-10-09 10:38:50 -07:00
Alexander Krotov
4d9ccb163e Get rid of mapLeft in Muse reader 2018-10-09 18:26:50 +03:00
Alexander Krotov
ca1624daa2 hlint Muse writer 2018-10-09 16:24:06 +03:00
Alexander Krotov
ca4ee9940c Muse reader: rewrite parseHtmlContent, verseTag and lineBlock in applicative style 2018-10-09 16:14:37 +03:00
Alexander Krotov
9ee00fc0f8 Get rid of unnecessary bind "res" 2018-10-09 11:58:59 +03:00
John MacFarlane
58eb78c437 Fixed tests for new skylighting. 2018-10-08 23:16:50 -07:00
John MacFarlane
2e9a8d207b Require skylighting 0.7.4.
Closes #4920.
2018-10-08 22:48:13 -07:00
John MacFarlane
6d87af8882 LaTeX writer with --listings: don't pass through org-babel attributes.
So far: just, tangle, exports, results which are used by org mode.
It might be better to use a whitelist of legal listings attributes, but
there are a large number, and these may change.

Closes #4889.
2018-10-08 21:45:39 -07:00
John MacFarlane
f8879ee0a1 Add helpful suggestion to missing title warning.
Tell users what to add to the command line to avoid the warning.
Closes #4909.
2018-10-08 21:33:25 -07:00
John MacFarlane
a92e43575f LaTeX writer: with --biblatex, use \autocite when possible.
`\autocites{a1}{a2}{a3}` will not collapse the entries.
So, if we don't have prefixes and suffixes, we use instead
`\autocite{a1;a2;a3}`.

Closes #4960.
2018-10-08 20:47:09 -07:00
John MacFarlane
b60c64d06e ODT writer: improve metadata.
- Author, date added to metadata.
- Remaining metadata properties (besides author, date, title, lang)
  are added as meta:user-defined tags.
2018-10-08 14:33:27 -07:00
John MacFarlane
b02c25b2ca Docx writer: handle tables in table cells.
Although this is not documented in the spec, some versions of
Word require a 'w:p' element inside every table cell. Thus, we
add one when the contents of a cell do not already include one
(e.g. when a table cell contains a table).

Closes #4953.
2018-10-07 18:57:25 -07:00
John MacFarlane
145710c4c3 RST reader: don't allow single-dash separator in headerless table.
Closes #4382.
2018-10-07 12:37:08 -07:00
John MacFarlane
b806bff5b4 LaTeX reader: fix bugs omitting raw tex.
The default is `-raw_tex`, so no raw tex should result
unless we explicitly say `+raw_tex`.  Previously some
raw commands did make it through.

Closes #4527.
2018-10-07 12:21:43 -07:00
John MacFarlane
9b481c8787 INSTALL: note about TinyTeX. 2018-10-07 12:21:28 -07:00
Yan Pas
753a4d376d Successful parsing of all Linux mans, except zic.8 2018-10-07 22:10:29 +03:00
John MacFarlane
08fef6b210 RST reader: pass through fields in unknown directives as div attributes.
This commit also adds support for `class` and `name` attributes to
directives in general.

Closes #4715.
2018-10-07 11:44:11 -07:00
John MacFarlane
f66a6704f9 Makefile - make .msi download targets more robust.
Now they should be insensitive to changes in the order
of the builds on appveyor.
2018-10-07 11:16:32 -07:00
John MacFarlane
fd9d08f9d6 Revert export of hasSimpleCells from T.P.Writers.Shared.
This wasn't necessary.
2018-10-07 10:20:14 -07:00