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
John MacFarlane
8c4812be3f
Roff tokenizer: allow . on next line after table format spec.
2018-10-26 22:52:27 -07:00
John MacFarlane
dc7f41bb64
Roff tokenizer: better handling of font inlines \f
....
2018-10-26 22:46:04 -07:00
John MacFarlane
9defc2545d
Roff tokenizer: allow eof in some places we allowed only newline.
2018-10-26 21:50:19 -07:00
John MacFarlane
cbeef9f5ca
Roff tokenizer: skip .sp in tables.
2018-10-26 21:37:42 -07:00
John MacFarlane
e0f985bb21
Rename Groff -> Roff.
...
Module T.P.Readers.Groff -> T.P.Readers.Roff
Module T.P.Writers.Groff -> T.P.Writers.Roff
Module T.P.GroffChar -> T.P.RoffChar
GroffTokens -> RoffTokens
GroffToken -> RoffToken.
2018-10-26 21:29:33 -07:00
John MacFarlane
52df18f476
Groff tokenizer: introduce TableRow type, handle .T&.
...
Closes #5020 .
2018-10-26 21:22:39 -07:00
Albert Krewinkel
7f70aaa5fa
Text.Pandoc.Lua: move globals handling to separate module
2018-10-26 22:24:21 +02:00
John MacFarlane
dc572e8a25
Always preserve tabs for man format.
...
We need it for tables.
2018-10-26 08:50:29 -07:00
John MacFarlane
1847335b1d
Groff tokenizer: Allow line comments between table rows.
2018-10-26 08:39:45 -07:00
John MacFarlane
8899f8838e
Man writer: don't wrap .SH and .SS lines.
...
Closes #5019 .
2018-10-26 07:10:52 -07:00
Alexander Krotov
1ca320e249
Muse reader: parse page breaks
2018-10-26 16:30:15 +03:00
John MacFarlane
74396c7f90
Add man reader to pandoc.cabal description.
2018-10-25 23:16:43 -07:00
John MacFarlane
23ca15e7ad
Man reader: allow empty simple table cells.
2018-10-25 22:53:48 -07:00
John MacFarlane
1ee594bf0e
Man reader: be more forgiving with table options.
2018-10-25 22:40:42 -07:00
John MacFarlane
444485d62c
Man reader: be more forgiving when parsing tables.
...
We now look only at the last row of the format specifiers,
if there is more than one row. (This is the default.)
2018-10-25 22:35:55 -07:00
John MacFarlane
e752e3d3c7
Groff tokenizer: handle \s+2
, etc.
2018-10-25 22:35:35 -07:00
John MacFarlane
3e3854fd4f
Man reader: be more forgiving in parsing table format spec.
2018-10-25 22:21:04 -07:00
John MacFarlane
5945c3b011
Man reader: support tables.
...
Closes #4982 .
2018-10-25 22:13:41 -07:00
Albert Krewinkel
096cbe6987
Lua: allow access to pandoc state ( #5015 )
...
* Lua: allow access to pandoc state
Lua filters and custom writers now have read-only access to most fields
of pandoc's internal state via the global variable `PANDOC_STATE`.
* Lua: allow iterating through fields of PANDOC_STATE
* Lua filters doc: describe CommonState
* Lua filters doc: mention global variable PANDOC_STATE
* Lua: add access to logs
Log messages can currently only be printed, but not decomposed.
2018-10-25 22:12:14 -07:00