Commit Graph
6019 Commits
Author SHA1 Message Date
John MacFarlane 65ca95eeea Texinfo writer: add blank line before @menu section.
Closes #5055.
2018-11-07 15:27:02 -08:00
Albert Krewinkel ff55530c03 T.P.App: fix regression in output format heuristics
This fix is necessary due to a rebasing error introduced in commit
418bd42df8
2018-11-07 21:36:36 +01:00
Albert Krewinkel 12f6cf13ad T.P.App: extract submodule T.P.App.FormatHeuristics
Format guessing is used for input and output options and should be
shared.
2018-11-07 21:29:48 +01:00
Albert Krewinkel 62a5f6fa85 ICML writer: fix missing type signature warning 2018-11-07 09:52:12 +01:00
John MacFarlane 6619b96dd7 Text.Pandoc.Pretty: don't render BreakingSpace at end of line...
or beginning of line.

Closes #5050.
2018-11-06 22:54:43 -08:00
John MacFarlane 985db7b0a8 ICML writer: consolidate adjacent strings, inc. spaces.
This avoids chunking up the output unnecessarily into
separate elements.
2018-11-06 22:54:25 -08:00
Albert Krewinkel dae3a0e3d2 T.P.App: extract Opt into separate module
The new Opt module has only a few dependencies. This is important for
compile-times during development, as Template Haskell containing modules
are be recompiled whenever a (transitive) dependency changes.
2018-11-06 21:31:12 +01:00
John MacFarlane 8c61fe8d6a Use DERIVE_JSON_VIA_TH in Text.Pandoc.Filter.
Previously AVOID_TEMPLATE_HASKELL was used (with the opposite
valence).  I assume this was a leftover from an earlier version.
2018-11-05 15:06:55 -08:00
Alexander Krotov 6a5661da63 hlint Muse writer 2018-11-06 00:04:33 +03:00
John MacFarlane f14396011e CommonMark writer: make sure --ascii affects quotes, super/subscript. 2018-11-05 09:55:15 -08:00
quasicomputational a747268823 CommonMark writer: respect --ascii (#5043) 2018-11-05 09:33:10 -08:00
John MacFarlane 511d647290 XML: toHtml5Entities: prefer shorter entities...
when there are several choices for a particular character.
2018-11-04 22:15:53 -08:00
Alexander Krotov 0c84630549 Muse writer: add support for --reference-location=
Address #107
2018-11-05 08:42:52 +03:00
Albert Krewinkel dc150df8e1 Add cabal flag derive_json_via_th
Disabling the flag will cause derivation of ToJSON and FromJSON
instances via GHC Generics instead of Template Haskell. The flag is
enabled by default, as deriving via Generics can be slow (see #4083).
2018-11-04 20:51:08 +01:00
John MacFarlane 7ac9c39996 AsciiDoc writer: prevent illegal nestings.
In asciidoc you can only have level n+1 headers directly under
level n headers.
2018-11-03 12:22:01 -07:00
John MacFarlane 2f65263851 AsciiDoc writer: use single-line section headers.
The underline style is now deprecated.
Previously `--atx-headers` would enable the single-line
style; now the single-line style is always used.

Closes #5038.
2018-11-03 12:03:05 -07:00
Alexander Krotov 9a004b86c9 Vimwiki reader: parse Text without converting to [Char] 2018-11-03 10:17:32 -07:00
Alexander Krotov 5686bdfc97 Creole reader: parse Text without converting to [Char] 2018-11-03 10:17:32 -07:00
Alexander Krotov e5cc24fb61 Make readWithM accept Text input as well as String (API change) 2018-11-03 10:17:32 -07:00
Alexander Krotov 95eccb94b0 Add Text.Pandoc.Shared.ToString typeclass (API change) 2018-11-03 10:16:47 -07:00
Albert Krewinkel 418bd42df8 App: extract output settings into module 2018-11-03 10:07:47 -07:00
Albert Krewinkel fd3c8cd8c7 App: extract command line options to separate module 2018-11-03 10:07:47 -07:00
John MacFarlane 2f6e4ba84a Man reader: table improvements. 2018-11-02 23:38:49 -07:00
John MacFarlane 2843ee960f Man reader: allow .SS to have blank contents. 2018-11-02 23:38:39 -07:00
John MacFarlane bcfc66092a Roff reader: Don't require global table options. 2018-11-02 23:18:08 -07:00
John MacFarlane 30dbd6a981 Roff reader: tbl improvements. 2018-11-02 23:06:50 -07:00
John MacFarlane 9719b0c74c Roff reader: Handle 'H' modifier after '.TS'. 2018-11-02 22:58:25 -07:00
John MacFarlane d18d9623b1 Roff reader: conditionals: allow .\} to end group. 2018-11-02 22:50:18 -07:00
John MacFarlane 65129f33fd Roff reader: reinstate column check for macros.
If .TS occurs in a table cell, this shouldn't
start a table.

We make an exception for the line after .if or .ie.
2018-11-02 22:42:58 -07:00
John MacFarlane 165e3bfffc Roff reader: another fix for conditionals. 2018-11-02 21:55:22 -07:00
John MacFarlane 8ee69c230b Roff reader: fixed small issue with conditionals. 2018-11-02 21:43:02 -07:00
John MacFarlane 805b9f8a12 Roff reader: Improved handling of custom strings as arguments.
Added test.
2018-11-02 21:35:49 -07:00
John MacFarlane e95aeeafb8 Roff reader: expand strings in font commands.
Closes #5039.
2018-11-02 21:25:52 -07:00
John MacFarlane aca87bb379 Revert "Revert "Revert "Roff reader: custom Stream type."""
This reverts commit 9a0333e489.
2018-11-02 20:43:13 -07:00
John MacFarlane 6b7a7adcbf Fix readWithM with Stream. 2018-11-02 20:26:36 -07:00
John MacFarlane 9a0333e489 Revert "Revert "Roff reader: custom Stream type.""
This reverts commit a64063af62.
2018-11-02 19:48:42 -07:00
John MacFarlane a64063af62 Revert "Roff reader: custom Stream type."
This reverts commit 211f7ffc78.

We were getting stack overflows.  Not sure why.
2018-11-02 18:47:45 -07:00
John MacFarlane 211f7ffc78 Roff reader: custom Stream type.
So far, this is just a shell.  But it will allow us to
expand macro strings while getting tokens, when we add
a custom uncons instance.
2018-11-02 18:47:27 -07:00
John MacFarlane c721d28c33 T.P.Parsing: Generalize readWithM to any Char Stream.
[API change]
2018-11-02 18:23:46 -07:00
John MacFarlane 9e369e9016 Roff reader: improve lexing of conditionals.
Partially addreses #5039.
2018-11-02 17:23:11 -07:00
John MacFarlane 563b1011b5 Text.Pandoc.App: improved detection of format based on extension.
We now ensure that if someone tries to convert a file
for a format that has a pandoc writer but not a reader,
it won't just default to markdown.
2018-11-01 21:24:57 -07:00
John MacFarlane e10d5b3d5b Change 'groff' -> 'roff'.
These formats (man, ms) are not groff-specific.
2018-11-01 16:46:43 -07:00
John MacFarlane 26341c1632 Implement --ascii for Markdown writer. 2018-11-01 16:31:04 -07:00
John MacFarlane f379edc4ad HTML writer: use character entities references when possible for HTML5. 2018-11-01 16:08:27 -07:00
John MacFarlane 5350ce26b4 Text.Pandoc.XML: add toHtml5Entities.
[API change]
2018-11-01 15:59:59 -07:00
Alexander Krotov bd59f8b708 Remove unnecessary hiding in Class.hs 2018-11-01 19:09:59 +03:00
Alexander Krotov 0d6a606d32 Remove Monad constraint implied by Stream 2018-11-01 19:02:24 +03:00
Alexander Krotov 72b5878dcb hlint Parsing.hs 2018-11-01 18:45:15 +03:00
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