Commit graph

11689 commits

Author SHA1 Message Date
Alexander Krotov
5cffd6bc77 LaTeX writer: remove unused local bind 2018-11-01 13:38:24 +03:00
Alexander Krotov
512732db7b Make uri accept any stream with Char tokens 2018-11-01 13:12:59 +03:00
Alexander Krotov
3b9d4edcfc Rewrite "uri" without "withRaw" 2018-11-01 12:49:28 +03:00
John MacFarlane
65614a85bc Work around HXT limitation for --syntax-definition with windows drive.
Closes #4836.
2018-10-31 23:37:37 -07:00
John MacFarlane
714e0eb834 ZimWiki writer: number ordered list items sequentially...
rather than always with 1.
2018-10-31 22:02:10 -07:00
John MacFarlane
e0290fd18b LaTeX writer: add newline if math ends in a comment.
This prevents the closing delimiter from being swalled
up in the comment.

Closes #4880.
2018-10-31 21:51:20 -07:00
John MacFarlane
ffd3aa4f09 Roff reader: rename RoffToken constructors so they're shorter. 2018-10-30 18:16:44 -07:00
John MacFarlane
c46593304c Roff reader: renamed constructors for RoffToken...
to more closely match nomenclature from man 7 groff.
2018-10-30 17:43:51 -07:00
John MacFarlane
e9130b8e52 Roff reader: removed MacroKind alias. 2018-10-30 15:59:34 -07:00
John MacFarlane
3305a018bc Roff reader: properly handle unknown backslash escapes.
They are treated as regular characters, according to groff 7.

Cloess #5034.
2018-10-30 15:54:29 -07:00
Alexander Krotov
e874bc2c28 Generalize gridTableWith to any streams with Char tokens 2018-10-31 00:16:58 +03:00
Alexander Krotov
51685cafde Generalize parseFromString' 2018-10-31 00:09:55 +03:00
Alexander Krotov
6f6e4c0d84 Generalize parseFromString to any streams with Char token 2018-10-31 00:06:05 +03:00
John MacFarlane
4fe28e947a ZimWiki writer: remove extra indentation on lists.
Closes #4963.
2018-10-29 22:33:11 -07:00
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