Albert Krewinkel
6082caf233
Custom writer: provide PANDOC_DOCUMENT instead of Setup function
...
Custom writers have access to the global variable `PANDOC_DOCUMENT`. The
variable contains a userdata wrapper around the full pandoc AST and
exposes two fields, `meta` and `blocks`. The field content is only
marshaled on-demand, performance of scripts not accessing the fields
remains unaffected.
2018-10-14 21:23:41 +02:00
John MacFarlane
983277c6eb
Travis: don't use targets in install deps.
2018-10-14 12:11:17 -07:00
John MacFarlane
c6f9ee64ae
Travis: another try.
2018-10-14 12:05:08 -07:00
John MacFarlane
9b0bd4ec6f
Markdown reader: Added updateStrPos in a couple places where needed.
2018-10-14 10:57:48 -07:00
John MacFarlane
225474879c
Another attempt to make travis work on cabal/ghc 8.6.1.
2018-10-14 10:57:20 -07:00
John MacFarlane
412c162601
Travis: removed quotes.
2018-10-14 10:14:25 -07:00
John MacFarlane
68e6866a01
Another try at ghc 8.6.1/cabal on travis.
2018-10-14 10:05:04 -07:00
John MacFarlane
8f5cd39534
Revert "Travis: add ghc 8.6.1 build."
...
This reverts commit 8cee5b183e
.
2018-10-14 09:54:55 -07:00
John MacFarlane
d534346084
Revert "Tweak travis for ghc 8.6.1."
...
This reverts commit eed4514c4c
.
2018-10-14 09:47:31 -07:00
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