Commit graph

12038 commits

Author SHA1 Message Date
John MacFarlane
230e07ddfc RST reader: handle sourcecode directive as synonynm for code.
Closes #5204.
2019-01-08 11:11:48 -08:00
John MacFarlane
599327bee1 Asciidoc writer: shorter delimiters for tables, blockquotes.
This matches asciidoctor reference docs.

Closes #4364.
2019-01-07 22:10:34 -08:00
John MacFarlane
c1d058aeb1 revealjs writer: fix some section nesting corner cases.
* Ensure that we don't get > 2 levels of section nesting,
  even with slide level > 2.
* If slide level == N but there is no N-level header, make
  sure the next header with level > N gets treated as a slide
  and put in a section, rather than remaining loose.

Closes #5168.
2019-01-07 21:54:14 -08:00
John MacFarlane
710a22e5ac Org reader: allow for case of :minlevel == 0.
See #5190.
2019-01-07 20:39:40 -08:00
Brian Leung
9dbcf16161 Org reader: handle minlevel option differently. (#5190)
When `minlevel` exceeds the original minimum level observed in the
file to be included, every heading should be shifted rightward.
2019-01-07 20:28:47 -08:00
John MacFarlane
f9d9880325 TWiki reader: fix performance issue with underscores.
Underscore emphasis can't cross table cell boundaries,
but the parser wasn't respecting this, leading to exponential
behavior in documents with table cells containing underscores.

This fixes the original sample; it's possible that there
are other performance issues involving underscores.

Closes #3921.
2019-01-07 20:24:22 -08:00
John MacFarlane
20bce07dd8 Clarified automatic identifiers.
We remove non-alphanumerics.  This includes, e.g., emojis.

Closes #5201.
2019-01-07 15:05:49 -08:00
John MacFarlane
94b24042a3 appveyor - use ghc 8.6.2, cabal 2.4.1.0.
See #5037.
2019-01-07 14:48:43 -08:00
Alexander Krotov
c0e4f66eb3 tools/changelog-helper.sh: use %aN instead of %an to respect .mailmap 2019-01-07 09:18:11 +03:00
Alexander Krotov
a92d6fa5be tools/changelog-helper.sh: remove [[ bashism 2019-01-07 09:17:21 +03:00
Alexander Krotov
ea2e25fd93 Add .mailmap 2019-01-07 08:44:40 +03:00
Alexander
40c30a9d88 Add DokuWiki reader (#5108)
Closes #1792
2019-01-06 15:06:32 -08:00
John MacFarlane
a5f5002eef Use toTableOfContents in Powerpoint writer....
instead of duplicating code.
2019-01-04 21:47:24 -08:00
John MacFarlane
571fede732 RTF writer: use toTableOfContents from T.P.W.Shared. 2019-01-04 21:27:49 -08:00
John MacFarlane
c4c3fca500 Implement --toc in commonmark/gfm writers.
Closes #5172.
2019-01-04 21:20:21 -08:00
John MacFarlane
0d609a72fd T.P.Writers.Shared - add toTableOfContents (API change).
This is refactored out from the Markdown writer.
IT can be used in other writers to create a generic TOC.
2019-01-04 21:09:49 -08:00
John MacFarlane
4ac036fe13 Cleaned up findPandoc. 2019-01-04 20:14:24 -08:00
John MacFarlane
fc87925b77 Tests: Fix findPandoc to work with Windows. 2019-01-04 18:36:15 -08:00
John MacFarlane
ae4a5f4858 Fix findPandoc so it works with cabalv2. 2019-01-04 17:44:26 -08:00
John MacFarlane
577ad44350 MANUAL: Update list of latex packages used. 2019-01-03 10:53:48 -08:00
John MacFarlane
9746938d06
LaTeX Template: Improve package selections (#5193)
* Use Babel for LuaTeX.  There are a number of bugs in Polyglossia under LuaLaTeX with common languages, e.g. <https://github.com/reutenauer/polyglossia/issues/182>.

* Load xcolor. The `xcolor` package must be loaded before the `footnote` package, which we load to fix foonotes in tables. Closes #4861.

* Load xurl if available. This breaks URLs in more locations. Only available with TeX Live 2018 and later.

* Remove obsolete fixltx2e package

* Reindent. Use two spaces to be consistent internally and with other templates.

* Use `bookmark` if available. The `bookmark` package can sometimes correct the levels of headings where `hyperref` cannot: see <https://komascript.de/release3.26>.

* Update LaTeX tests
2019-01-03 10:47:48 -08:00
Andrew Dunning
f3709ccba3 LaTeX template: Require xcolor 2019-01-02 22:34:17 -05:00
John MacFarlane
e8fba105a5 Removed custom Setup.hs, use build-type: simple.
The only thing we gained from the custom build was
automatic installation of the man page when using
'cabal install'.  But custom builds cause problems,
e.g., with cross-compilation.

Installation of the man page is better handled by packagers.

Note to packagers (e.g. Debian):  it may be necessary
to add a step installing the man page with the next
release.
2019-01-02 17:02:02 -08:00
John MacFarlane
308e4671d6 A trivial change to document the addition of task_lists.
These notes should have been in the previous commit message.

Added `task_list` extension.

API changes:

+ Added constructor `Ext_task_lists` to `Extension`.
+ Added `taskListItemFromAscii` and `taskListItemToAscii` to
  Text.Pandoc.Shared.

Task lists are supported form markdown and gfm input.
They should work, to some degree, in all output formats,
though in most formats you'll get an ordered list with
a following task list box.  In HTML and LaTeX/PDF output,
the bullet will be suppressed for nicer output.
2019-01-02 11:38:44 -08:00
Mauro Bieg
f1d83aea12 Implement task lists (#5139)
Closes #3051
2019-01-02 11:36:37 -08:00
John MacFarlane
9097ec41a9 EPUB writer: small fixes to nav.xhtml.
* Add 'landmarks' id attribute to the landmarks nav.
* Replace old default CSS removing numbers from ol.toc li
  with new rules that match `nav#toc ol, nav#landmarks ol`.
* We keep the `toc` class on `ol` for backwards compatibility.
2019-01-02 11:24:53 -08:00
John MacFarlane
ea8af33dab Commonmark writer: fix handling of SoftBreak with hard_line_breaks.
This should be rendered as a space.
Closes #5195.
2019-01-02 10:31:13 -08:00
John MacFarlane
1bbbd5fad3 Manual: make it clear that hard_line_breaks works in gfm.
See #5195.
2019-01-02 10:14:37 -08:00
Andrew Dunning
fc9ac7993a LaTeX template: Supply missing for
Partially addresses #5179
2019-01-01 19:23:52 -05:00
Andrew Dunning
2c0af6e3a3 Update LaTeX tests 2019-01-01 17:47:02 -05:00
Andrew Dunning
8feda269b0 LaTeX template: Use bookmark if available
The `bookmark` package can sometimes correct the levels of headings where `hyperref` cannot: see <https://komascript.de/release3.26>.
2019-01-01 17:31:39 -05:00
damien clochard
4ab2a46bdc Zimwiki writer: remove automatic colon prefix before internal images (#5183)
* FIX #5183 : zimwiki : remove automatic colon prefix before internal images

![](foo.png) should be converted to {{foo.png}} (relative path)
![](/foo.png] should be converted to {{/foo.png}} (absolute path)

Therefore the ':' prefix is useless and must be removed.

I never used the zimwiki, but i submitted the similar dokuwiki fix.

1. The zimwiki syntax is inspired by dokuwiki
2. The zimwiki documentation does not mention the colon character for images
3. The pandoc zimwiki writer seems to be a copy-paste for the dokuwiki writer

If the PR #5184 is applied, I think this one should be applied too.
2019-01-01 14:08:38 -08:00
damien clochard
814e97df92 Dokuwiki writer: remove automatic ':' prefix before internal image links (#5183)
* FIX #5183 : remove automatic ':' prefix before internal image links

`![](foo.png)` should be converted to `{{foo.png}}` (relative path)
`![](/foo.png]` should be converted to `{{/foo.png}}` (absolute path)

Therefore the ':' prefix is useless and must be removed.
It blocks users from making relative image links.

Update tests for DokuWiki Writer : external images
2019-01-01 14:07:26 -08:00
Albert Krewinkel
2f92261d87
Org reader: fix self-link parsing regression
Fixes a regression introduced by the previous commit.
2019-01-01 22:06:44 +01:00
Albert Krewinkel
c0caaaeabb
Org reader: fix treatment of links to images
Links with descriptions which are pointing to images are no longer read
as inline images, but as proper links.

Fixes: #5191
2019-01-01 21:03:38 +01:00
Andrew Dunning
6a71997fcb LaTeX template: Reindent
Use two spaces to be consistent internally and with other templates.
2019-01-01 14:59:19 -05:00
Andrew Dunning
3160836983 LaTeX template: Remove obsolete fixltx2e package 2019-01-01 14:57:19 -05:00
Albert Krewinkel
af887e9198
Org reader: hlint 2019-01-01 20:49:51 +01:00
Andrew Dunning
b6d13467f6 LaTeX template: Load xurl if available
This breaks URLs in more locations. Only available with TeX Live 2018 and later.
2019-01-01 14:47:20 -05:00
Andrew Dunning
275cedc59c LaTeX template: Load xcolor if available
The `xcolor` package must be loaded before the `footnote` package, which we load to fix foonotes in tables. Closes #4861.
2019-01-01 14:45:20 -05:00
Andrew Dunning
d410554f46
LaTeX Template: Use Babel for LuaTeX
There are a number of bugs in Polyglossia under LuaLaTeX with common languages, e.g. <https://github.com/reutenauer/polyglossia/issues/182>.
2019-01-01 14:37:42 -05:00
Alexander
792f18a7fa Remove unused HasHeaderMap (#5175)
It is updated by some readers, but never actually used.
2018-12-31 21:41:21 -08:00
John MacFarlane
ffc2192caf Simplify/fix reading of --metadata values on command line.
Previously we used HsYAML's decodeStrict to recognize
boolean values (treating everything else as a string).
This caused problems relating to hvr/HsYAML#7.

We now just check for the recognized boolean values
`true|True|TRUE|false|False|FALSE`, and avoid using
HsYAML.

Closes #5177.
2018-12-31 21:20:56 -08:00
Mauro Bieg
c8b79b0a04 Replace read with safeRead (#5186)
closes #5180
2018-12-31 15:26:38 -08:00
John MacFarlane
a1ad5bb8ce Allow '-' in filenames for custom lua writers.
Closes #5187.
2018-12-31 15:15:18 -08:00
John MacFarlane
5cd48c8e79 Removed obsolete and misleading comment. 2018-12-31 15:07:42 -08:00
Albert Krewinkel
4eb8a97a1c
doc/org.md: improve documentation of org features 2018-12-29 15:20:44 +01:00
leungbk
c998b937c1 Org writer: preserve line-numbering for example and code blocks. 2018-12-28 15:07:05 +01:00
Mauro Bieg
053c683d35
Merge pull request #5185 from gely/master
Fix typo in MANUAL.txt
2018-12-27 18:15:04 +01:00
Geoffrey Ely
0673da04fe Fix typo in MANUAL.txt
The example to create a div with id `refs` instead creates a div with class `#refs`.  The fix is to add curly brackets.
2018-12-27 11:43:03 -05:00