Commit graph

11863 commits

Author SHA1 Message Date
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
e01ca77313 grofftest.sh - set resource path more appropriately. 2018-11-02 17:22:56 -07:00
John MacFarlane
c71fbb18e1 Improve test/grofftest.sh.
Use --resource-path.
Use iconv for latin1 man pages.
Recurse into subdirectories.
2018-11-02 10:59:38 -07:00
John MacFarlane
c0e0ef12cf Update manual date and man page. 2018-11-01 21:56:41 -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
Mauro Bieg
614b1c0c61 MANUAL: clarify LaTeX image dimensions output 2018-11-01 14:15:09 -07:00
John MacFarlane
2f579193ae getting-started.md: Added title to test1.md to avoid warning. 2018-11-01 11:49:49 -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
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