aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2019-01-26Improve writing metadata for docx, pptx and odt (#5252)Agustín Martín Barbero4-18/+99
* docx writer: support custom properties. Solves the writer part of #3024. Also supports additional core properties: `subject`, `lang`, `category`, `description`. * odt writer: improve standard properties, including the following core properties: `generator` (Pandoc/VERSION), `description`, `subject`, `keywords`, `initial-creator` (from authors), `creation-date` (actual creation date). Also fix date. * pptx writer: support custom properties. Also supports additional core properties: `subject`, `category`, `description`. * Includes golden tests. * MANUAL: document metadata support for docx, odt, pptx writers
2019-01-26Normalize Windows paths to account for change in ghc 8.6.John MacFarlane1-9/+31
When pandoc is compiled with ghc 8.6, Windows paths are treated differently, and paths beginning `\\server` no longer work. This commit rewrites such patsh to `\\?\UNC\server` which works. The change operates at the level of argument parsing, so it only affects the command line program. See #5127 and the discussion there.
2019-01-25Texinfo writer: use header identifier for anchor if present.John MacFarlane1-2/+4
Previously we were overwriting an existing identifier with a new one. Closes #4731.
2019-01-25MediaWiki reader: use `_` instead of `-` in auto-identifiers.John MacFarlane1-1/+6
Partially addresses #4731. We may not still be exactly matching mediawiki's algorithm for identifiers.
2019-01-25LaTeX writer: add `#` special characeters for listings.John MacFarlane1-1/+1
This character needs special handling in lstinline. Closes #4939.
2019-01-24Ipynb: Put all jupyter metadata under 'jupyter' key.John MacFarlane2-2/+7
2019-01-24Revert "Prepend `jupyter_` to jupyter metadata keys."John MacFarlane2-12/+0
This reverts commit 5eaff399d5d6dc30b0d453eff42c4101674d75ab.
2019-01-24Allow some command line options to take URL in addition to FILE.John MacFarlane1-2/+2
`--include-in-header`, `--include-before-body`, `--include-after-body`
2019-01-24Ms writer: ensure we have a newline after .EN in disply math.John MacFarlane1-1/+1
Closes #5251.
2019-01-24Prepend `jupyter_` to jupyter metadata keys.John MacFarlane2-0/+12
This avoids conflics with things like 'toc'.
2019-01-23Removed superfluous import.John MacFarlane1-1/+0
2019-01-22Support ipynb (Jupyter notebook) as input and output format.John MacFarlane8-0/+495
[API change] * Depend on ipynb library. * Add `ipynb` as input and output format. * Added Text.Pandoc.Readers.Ipynb (supports both nbformat v3 and v4). * Added Text.Pandoc.Writers.Ipynb (supports nbformat v4). * Added ipynb readers and writers to T.P.Readers, T.P.Writers, and T.P.Extensions. Register the file extension .ipynb for this format. * Add `PandocIpynbDecodingError` constructor to Text.Pandoc.Error.Error. * Note: there is no template for ipynb.
2019-01-22LaTeX reader: support `\endinput`. Closes #5233.John MacFarlane1-0/+1
2019-01-22Man reader: fix typo. (#5245)Brian Leung1-3/+3
2019-01-21HTML and markdown: treat textarea as a verbatim environment.John MacFarlane2-8/+10
We don't want to parse its contents as Markdown or HTML. Closes #5241.
2019-01-20LaTeX reader: allow includes with dots like cc_by_4.0.John MacFarlane1-3/+5
Previously the `.0` was interpreted as a file extension, leading pandoc not to add `.tex` (and thus not to find the file). The new behavior matches tex more closely.
2019-01-20LaTeX reader: cleaned up 'input' code.John MacFarlane1-10/+5
2019-01-17odt writer: fix typo in custom properties (#5231)Agustín Martín Barbero1-2/+2
fixes #2839
2019-01-10Make raw content marked `beamer` work in `beamer` output.John MacFarlane1-14/+18
See pandoc/lua-filters#40.
2019-01-10Make 'plain' RawBlocks work for 'plain' output.John MacFarlane1-0/+5
2019-01-09RST reader: change treatment of `number-lines` directives. (#5207)Brian Leung1-15/+15
Directives of this type without numeric inputs should not have a `startFrom` attribute; with a blank value, the writers can produce extra whitespace.
2019-01-09Beamer writer: avoid duplicated `fragile` property in some cases.John MacFarlane1-1/+3
Closes #5208.
2019-01-08EPUB writer: ensure that picture transforms are done on metadata too.John MacFarlane1-6/+6
2019-01-08Removed superfluous sourceCode class on code blocks.John MacFarlane3-11/+7
* These were added by the RST reader and, for literate Haskell, by the Markdown and LaTeX readers. There is no point to this class, and it is not applied consistently by all readers. See #5047. * Reverse order of `literate` and `haskell` classes on code blocks when parsing literate Haskell. Better if `haskell` comes first.
2019-01-08RST reader: handle sourcecode directive as synonynm for code.John MacFarlane1-1/+1
Closes #5204.
2019-01-07Asciidoc writer: shorter delimiters for tables, blockquotes.John MacFarlane1-3/+2
This matches asciidoctor reference docs. Closes #4364.
2019-01-07revealjs writer: fix some section nesting corner cases.John MacFarlane1-6/+13
* 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-07Org reader: allow for case of :minlevel == 0.John MacFarlane1-1/+3
See #5190.
2019-01-07Org reader: handle `minlevel` option differently. (#5190)Brian Leung1-3/+1
When `minlevel` exceeds the original minimum level observed in the file to be included, every heading should be shifted rightward.
2019-01-07TWiki reader: fix performance issue with underscores.John MacFarlane1-1/+3
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-06Add DokuWiki reader (#5108)Alexander2-0/+532
Closes #1792
2019-01-04Use toTableOfContents in Powerpoint writer....John MacFarlane1-16/+3
instead of duplicating code.
2019-01-04RTF writer: use toTableOfContents from T.P.W.Shared.John MacFarlane1-17/+2
2019-01-04Implement --toc in commonmark/gfm writers.John MacFarlane2-3/+14
Closes #5172.
2019-01-04T.P.Writers.Shared - add toTableOfContents (API change).John MacFarlane2-22/+25
This is refactored out from the Markdown writer. IT can be used in other writers to create a generic TOC.
2019-01-02Implement task lists (#5139)Mauro Bieg8-18/+96
Closes #3051
2019-01-02EPUB writer: small fixes to nav.xhtml.John MacFarlane1-0/+1
* 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-02Commonmark writer: fix handling of SoftBreak with `hard_line_breaks`.John MacFarlane1-1/+1
This should be rendered as a space. Closes #5195.
2019-01-01Zimwiki writer: remove automatic colon prefix before internal images (#5183)damien clochard1-6/+2
* 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-01Dokuwiki writer: remove automatic ':' prefix before internal image links (#5183)damien clochard1-6/+2
* 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-01Org reader: fix self-link parsing regressionAlbert Krewinkel1-5/+6
Fixes a regression introduced by the previous commit.
2019-01-01Org reader: fix treatment of links to imagesAlbert Krewinkel2-13/+16
Links with descriptions which are pointing to images are no longer read as inline images, but as proper links. Fixes: #5191
2019-01-01Org reader: hlintAlbert Krewinkel1-2/+2
2018-12-31Remove unused HasHeaderMap (#5175)Alexander7-50/+4
It is updated by some readers, but never actually used.
2018-12-31Simplify/fix reading of `--metadata` values on command line.John MacFarlane1-7/+8
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-31Replace read with safeRead (#5186)Mauro Bieg3-13/+18
closes #5180
2018-12-31Allow '-' in filenames for custom lua writers.John MacFarlane1-2/+3
Closes #5187.
2018-12-31Removed obsolete and misleading comment.John MacFarlane1-1/+0
2018-12-28Org writer: preserve line-numbering for example and code blocks.leungbk1-3/+9
2018-12-18Decompress .svgz when converting to "data:" URIAlexander Krotov1-1/+1
Address #5163