John MacFarlane
c51be5dfc8
LaTeX reader: allow space at end of math after \
.
...
Closes #5010 .
Expose trimMath from T.P.Shared.
2018-10-29 22:20:14 -07:00
John MacFarlane
9e3a2b61ec
Roff reader: improved escape parsing.
...
Closes #5032 .
This also removes the FontSize constructor from LinePart.
We don't need this yet.
2018-10-29 21:51:49 -07:00
John MacFarlane
39f026298d
Roff tokenizer: allow \*~
etc.
2018-10-28 21:58:31 -07:00
John MacFarlane
eb13f76dec
Roff tokenizer: handle e.g. \*n
.
2018-10-28 21:49:27 -07:00
John MacFarlane
8d55dc10cd
Roff tokenizer: better handling of escapes.
2018-10-28 21:37:57 -07:00
John MacFarlane
7a30eae693
Roff reader: introduce normal/copy mode distinction.
2018-10-28 21:03:07 -07:00
John MacFarlane
6b8e595e72
Roff reader: use escapeArg in macroArg.
2018-10-28 20:41:17 -07:00
John MacFarlane
b1e7101393
Roff tokenizer: refactor escString.
2018-10-28 18:11:57 -07:00
John MacFarlane
22755a35b7
Roff tokenizer: revamped font parsing using escapeArg.
...
Add support for \C'...' escapes.
2018-10-28 18:06:34 -07:00
John MacFarlane
53d89d7eab
Roff tokenizer: abstract out patterns: escapeArg, quoteArg.
2018-10-28 17:23:09 -07:00
John MacFarlane
3cb8a3f397
Roff tokenizer: allow space before ( in table options.
2018-10-28 17:22:20 -07:00
John MacFarlane
7c9ff8461f
small wording change
2018-10-28 16:18:11 -07:00
mb21
7e6f13cf81
EPUB writer: use metadata field css
instead of stylesheet
...
closes #4990
2018-10-28 16:18:11 -07:00
Albert Krewinkel
8ef995cfc0
T.P.Filter: centralize filter path expansion
2018-10-28 12:08:52 -07:00
Albert Krewinkel
f612421307
T.P.Lua: expose more useful internals (API change)
...
Newly exported from Text.Pandoc.Lua:
- `runFilterFile` to run a Lua filter from file;
- data type `Global` and its constructors; and
- `setGlobals` to add globals to a Lua environment.
This module also contains `Pushable` and `Peekable` instances required
to get pandoc's data types to and from Lua. Low-level Lua operation
remain hidden in Text.Pandoc.Lua.
2018-10-28 12:08:52 -07:00
Albert Krewinkel
6f29e1c9c1
T.P.Lua: rename runPandocLua
to runLua
(API change)
2018-10-28 12:08:52 -07:00
Albert Krewinkel
7f54f76e8b
T.P.Lua: merge runLuaFilter into T.P.Filter.Lua (API change)
...
The function `runLuaFilter` was only used in Text.Pandoc.Filter.Lua, use
apply from the that module instead.
2018-10-28 12:08:52 -07:00
Albert Krewinkel
0531a4653a
API change: expose module Text.Pandoc.Filter
...
The module is likely to be useful to library users.
2018-10-28 12:08:52 -07:00
John MacFarlane
fd672f9722
Man reader: improved code blocks as continuation in list items.
2018-10-28 12:00:25 -07:00
John MacFarlane
26a7583209
Man reader: allow both .in and .IP to indent code block.
2018-10-28 11:50:09 -07:00
John MacFarlane
07647f05f0
Man reader: skip .in used for indentation of code.
2018-10-28 11:44:41 -07:00
John MacFarlane
8de8313ca1
Man reader: .PP in code blocks as blank line.
2018-10-28 11:40:15 -07:00
John MacFarlane
2d785c1e37
Man reader: handle inline macros like .BI in code blocks.
...
The font changes are discarded, but at least we keep the text.
2018-10-28 11:31:48 -07:00
John MacFarlane
fdce771a4e
Hlint changes.
2018-10-28 10:46:45 -07:00
John MacFarlane
fe73707ab1
Roff tokenizer: better handling of table format strings.
...
Particularly f and m, which require a space after their
argument. Also, allow space before numerical arguments, as
in his example from stty.1:
```
.TS
center tab(@) box;
cB cB | cB cB | cB cB
lf5 2 l 6 | lf5 2 l 6 | lf5 2 l.
\&^c@Value@^c@Value@^c@Value
```
2018-10-28 10:41:24 -07:00
John MacFarlane
e96bb43ceb
Man reader: allow block-level content in table cells.
...
Closes #5028 .
2018-10-27 23:37:18 -07:00
Alexander Krotov
f8ca36525d
Muse: Make tables round-trip
2018-10-28 03:52:35 +03:00
Alexander Krotov
e34a0703f5
Muse reader: try to parse lists before trying to parse table
...
This ensures that tables inside lists are parsed correctly.
2018-10-28 03:52:25 +03:00
Alexander Krotov
d8135b2e67
Remove misleading comment from Muse reader tests
...
pandoc follows Text::Amuse rules instead of being bug compatible with Emacs Muse
2018-10-27 23:43:23 +03:00
Alexander Krotov
d28dca57db
Muse reader: forbid whitespace after opening and before closing markup elements
...
See https://github.com/melmothx/text-amuse/issues/44 for discussion on these rules
2018-10-27 23:35:11 +03:00
John MacFarlane
dc77d36a7f
Revert "Roff tokenizer: use Seq for lineparts rather than lists."
...
This reverts commit 3a5726b2cf
.
2018-10-27 12:30:03 -07:00
John MacFarlane
cd93faddbf
Revert "Roff reader: use LineParts abstraction."
...
This reverts commit 42ba3c0a0b
.
2018-10-27 12:29:54 -07:00
John MacFarlane
42ba3c0a0b
Roff reader: use LineParts abstraction.
...
This didn't really help performance in the end.
2018-10-27 12:28:15 -07:00
John MacFarlane
3a5726b2cf
Roff tokenizer: use Seq for lineparts rather than lists.
...
This didn't make much measurable difference (compiled w/o
optimizations), but it still seems worth doing. Eventually
we may want an abstraction like RoffTokens for LineParts.
2018-10-27 11:42:16 -07:00
Albert Krewinkel
0b8a31f77f
pandoc.cabal: add GHC 8.6.1 to list of tested compilers
2018-10-27 20:35:21 +02:00
Albert Krewinkel
b088af559a
.travis.yml: test with GHC 8.6.1
2018-10-27 20:35:21 +02:00
Albert Krewinkel
ebb35e613c
.travis.yml: simplify GHC and cabal package handling
...
This reduces duplicate information on GHC and cabal versions when
defining build environments.
2018-10-27 20:35:20 +02:00
Albert Krewinkel
dc4b5cb0e5
.travis.yml: define GHC_OPTIONS global variable
2018-10-27 20:35:20 +02:00
Albert Krewinkel
fc3f055baa
.travis.yml: remove redundant compiler options
...
Additional compiler warnings are enabled via the cabal file.
2018-10-27 20:35:20 +02:00
Albert Krewinkel
106f8496c0
.travis.yml: break long commands into multiple lines
2018-10-27 20:35:20 +02:00
Albert Krewinkel
f0bc235c82
.travis.yml: break *env* definitions into multiple lines
2018-10-27 20:35:20 +02:00
Albert Krewinkel
f966a8c432
pandoc.cabal: enable more compiler warnings
2018-10-27 20:35:20 +02:00
John MacFarlane
0a29da5042
Remove old comment.
2018-10-27 11:22:21 -07:00
John MacFarlane
9678538f45
Roff tokenizer: allow digit suffix in table cell format in any order.
...
Closes #5026 .
2018-10-27 11:10:15 -07:00
John MacFarlane
f5e26e4512
Roff tokenizer: check for first-column before parsing macro.
...
Also add SourcePos as argument to lexRoff, so we can pass in
current source pos when parsing a table cell.
Closes #5025 .
2018-10-27 11:03:03 -07:00
John MacFarlane
a3b351c3a6
Man reader: don't throw an error if a table cell can't be parsed...
...
as inlines. Instead, just have the parser fail.
See #5026 .
2018-10-27 09:09:40 -07:00
John MacFarlane
1a7b9382db
Man reader: allow .nf to be implicitly closed by eof.
2018-10-27 08:52:01 -07:00
John MacFarlane
dae03de44c
Roff reader: allow table options to be empty.
...
Partially addresses #5026 .
2018-10-27 08:19:44 -07:00
John MacFarlane
92a810dc66
Roff tokenizer: further table format spec parsing improvements.
2018-10-26 23:02:53 -07:00
John MacFarlane
36f1c4f39b
Roff tokenizer: allow spaces after table row format spec.
2018-10-26 22:55:48 -07:00