Commit graph

4756 commits

Author SHA1 Message Date
John MacFarlane
90597fe292 LaTeX reader: insert space when needed in macro expansion.
Sometimes we need to insert a space after a control sequence
to prevent it merging with a following letter.

Closes #4007.
2017-10-30 11:51:49 -07:00
John MacFarlane
272b833ad5 Allow unbraced arguments for macros.
See #4007.
2017-10-30 11:35:40 -07:00
John MacFarlane
601a28fd36 Allow body of macro definition to be unbraced.
e.g.

    \newcommand\arrow\to

See #4007.
2017-10-30 10:59:52 -07:00
John MacFarlane
1e1a7a9b83 Fixed warnings. 2017-10-29 15:19:49 -07:00
John MacFarlane
6a1476e7e2 Export all of Text.Pandoc.Class from Text.Pandoc. 2017-10-29 15:00:49 -07:00
John MacFarlane
95ccbdaac2 Removed useless notes state in DokuWiki writer. 2017-10-29 14:55:22 -07:00
John MacFarlane
52ee19a825 Source code reformatting. 2017-10-29 14:29:32 -07:00
John MacFarlane
f270dd9b18 hlint suggestions. 2017-10-29 14:18:06 -07:00
John MacFarlane
271e1fe2f1 More hlint. 2017-10-29 13:19:15 -07:00
John MacFarlane
9ef4ad2e20 Small reformat. 2017-10-29 13:01:04 -07:00
John MacFarlane
b18dbfe792 Use uncurry. 2017-10-29 12:58:41 -07:00
John MacFarlane
8e5e8746d8 More hlint fixes. 2017-10-29 12:45:37 -07:00
Alexander
3263d0d7c4 Write FB2 lists without nesting blocks inside <p> (#4004)
According to FB2 XML schema <empty-line /> cannot be placed inside
<p>. Linux FBReader can't display such paragraphs, e.g. any "loose"
lists produced by pandoc prior to this commit.  Besides that,
FB2 writer placed <p> inside <p> when writing nested lists,
this commit fixes the bug.

Also this commit removes leading non-breaking space from ordered
lists for consistency with bullet lists.

Definition lists are not affected at all.
2017-10-29 14:46:44 -04:00
John MacFarlane
47e2719cc3 Fix warning for older GHC versions. 2017-10-28 09:56:20 -07:00
John MacFarlane
b39f782c8d Try to fix imports for older ghc. 2017-10-28 00:09:23 -07:00
John MacFarlane
cb42bb820c Change order of imports to satisfy older ghc. 2017-10-28 00:01:44 -07:00
John MacFarlane
cbcb9b36c0 hlint suggestions. 2017-10-27 23:13:55 -07:00
John MacFarlane
8481298357 Don't rely on syb when we don't need to. 2017-10-27 21:44:22 -07:00
John MacFarlane
b201a8aa58 hlint changes. 2017-10-27 21:32:53 -07:00
John MacFarlane
f3e901c29d hlint suggestions. 2017-10-27 21:26:16 -07:00
John MacFarlane
be7a29e9b9 hlint suggestions. 2017-10-27 21:11:26 -07:00
John MacFarlane
e77d08e439 hlint suggestions. 2017-10-27 21:07:47 -07:00
John MacFarlane
ff16db1aa3 Automatic reformating by stylish-haskell. 2017-10-27 20:28:29 -07:00
hftf
7f8a3c6cb7 Consistent underline for Readers (#2270)
* Added underlineSpan builder function.  This can be easily updated if needed. The purpose is for Readers to transform underlines consistently.

* Docx Reader: Use underlineSpan and update test

* Org Reader: Use underlineSpan and add test

* Textile Reader: Use underlineSpan and add test case

* Txt2Tags Reader: Use underlineSpan and update test

* HTML Reader: Use underlineSpan and add test case
2017-10-27 18:45:00 -04:00
Kolen Cheung
0b09409385 update years in copyright 2017-10-26 22:57:13 -07:00
Sascha Wilde
66fd3247ea Creole reader (#3994)
This is feature complete but not very thoroughly tested yet.
2017-10-26 19:19:28 -04:00
John MacFarlane
33eee0ceb8 Comment reformat. 2017-10-26 11:35:27 -07:00
John MacFarlane
424e94bd45 makePDF: add argument for pdf options, remove writerPdfArgs.
- Removed writerPdfArgs from WriterOptions (API change).
- Added parameter for pdf args to makePDF.
2017-10-26 11:11:45 -07:00
John MacFarlane
23fbf8a533 Text.Pandoc.App: export applyFilters, applyLuaFilters. (API change) 2017-10-24 22:46:06 -07:00
John MacFarlane
f82bcc2bf3 Added some haddock docs for Text.Pandoc.Class functions. 2017-10-24 22:12:05 -07:00
John MacFarlane
ebc801cfc5 HTML reader: close td/th should close any open block tag...
Closes #3991.
2017-10-24 14:45:43 -07:00
John MacFarlane
38b5f24a66 HTML reader: td should close an open th or td. 2017-10-24 14:42:33 -07:00
John MacFarlane
ad2df0655e Revert "HTML reader: td or th implicitly closes blocks within last td/th."
This reverts commit d2c4243f89.
2017-10-24 14:32:51 -07:00
John MacFarlane
d2c4243f89 HTML reader: td or th implicitly closes blocks within last td/th. 2017-10-24 14:27:49 -07:00
John MacFarlane
513b16a71b Fenced divs: ensure that paragraph at end doesn't become Plain.
Added test case.
2017-10-24 09:53:29 -07:00
John MacFarlane
ecb5475a2a Back to using [WARNING] and [INFO] to mark messages. 2017-10-23 23:01:37 -07:00
John MacFarlane
fda0c0119f Implemented fenced Divs.
+ Added Ext_fenced_divs to Extensions (default for pandoc Markdown).
+ Document fenced_divs extension in manual.
+ Implemented fenced code divs in Markdown reader.
+ Added test.

Closes #168.
2017-10-23 22:45:28 -07:00
John MacFarlane
896803b0d5 HTML reader: htmlTag improvements.
We previously failed on cases where an attribute contained a `>`
character. This patch fixes the bug.

Closes #3989.
2017-10-23 17:29:32 -07:00
John MacFarlane
1a82ecbb68 More pleasing presentation of warnings and info messages.
!! warning
-- info
2017-10-23 15:00:11 -07:00
John MacFarlane
6d862ff954 Downgraded SkippedContent and DocxParserWarning from WARNING to INFO 2017-10-23 10:54:51 -07:00
mb21
e2123a4033 LaTeX Reader: support \lettrine 2017-10-22 20:33:30 +02:00
mb21
05adbd6f19 LaTeX Reader: use opt function consistently 2017-10-22 20:33:30 +02:00
John MacFarlane
4aa84f4006 In rendering PandocParsecError, only print input at error location...
if the source name is `source` (i.e., the top level). Otherwise
results will be misleading, since what readM does is to look
up the source position of the error in the *original* input,
which may not match the input used by parseFromString or
in parsing from an included file.

Closes #3865.  Not a great fix, maybe there's something better
that could be done, but this should at least avoid misleading
messages.
2017-10-21 21:54:38 -07:00
John MacFarlane
5164ecd0ec SelfContained: data-background-image instead of data-background.
Really closes #3979.
2017-10-20 23:16:53 -07:00
John MacFarlane
21328a8771 LaTeX reader: be more forgiving in parsing command options.
This was needed, for example, to make some minted options work.
2017-10-19 15:58:29 -07:00
John MacFarlane
f615d7bb98 LaTeX reader: Strip off quotes in \include filenames. 2017-10-19 15:36:18 -07:00
John MacFarlane
28bb5d610d LaTeX reader: support \expandafter.
Closes #3983.
2017-10-19 13:23:50 -07:00
John MacFarlane
e941ba05b9 LaTeX reader: handle \DeclareRobustCommand.
Currently it's just treated as a synonym for `\newcommand`.

Handles the second case mentioned in #3983.
2017-10-19 11:50:16 -07:00
Ben Firshman
9046dbadb1
Latex reader: Skip spaces in image options 2017-10-17 16:42:11 +03:00
John MacFarlane
c2de9d749c SelfContained: handle data-background attribute on section.
This should help with #3979.

In my test, I got a data uri for data-background. But it didn't
actually work in the browser (the background image didn't show).
Not sure whether this is a problem in reveal.js or a problem
in pandoc...
2017-10-16 23:10:05 -07:00