summaryrefslogtreecommitdiff
path: root/src/Text
Commit message (Collapse)AuthorAge
* Org reader: fix smart parsing behaviorAlbert Krewinkel2017-05-18
| | | | | | | | | | | | | | | | Parsing of smart quotes and special characters can either be enabled via the `smart` language extension or the `'` and `-` export options. Smart parsing is active if either the extension or export option is enabled. Only smart parsing of special characters (like ellipses and en and em dashes) is enabled by default, while smart quotes are disabled. This means that all smart parsing features will be enabled by adding the `smart` language extension. Fine-grained control is possible by leaving the language extension disabled. In that case, smart parsing is controlled via the aforementioned export OPTIONS only. Previously, all smart parsing was disabled unless the language extension was enabled.
* Don't render LaTeX images with data: URIs.John MacFarlane2017-05-18
| | | | | | | LaTeX can't handle these. Note that --extract-media can be used when the input contains data: URIs. Closes #3636.
* Docx writer: Change FigureWithCaption to CaptionedFigure (#3658)Ian2017-05-18
| | | | Edit styles.xml as part of the fix for #3656
* Don't double extract images from docx.John MacFarlane2017-05-18
| | | | | | | | | | | This fixes a regression that was introduced when `--extract-media` was generalized to work with any input format. We were getting two versions of each image extracted from a docx, one with a hash, one with the original filename, though only the hash one was used. This patch restores the original behavior (using the original filename). Pointed out in comments on #3674. Thanks to @laperouse.
* Markdown: allow attributes in reference links to start on next line.John MacFarlane2017-05-18
| | | | This addresses a subsidiary issue in #3674.
* Add `--eol` flag and writer option to control line endings.Stefan Dresselhaus2017-05-18
| | | | | | | | | | | | * Add `--eol=crlf|lf` CLI option. * Add `optEol` to `WriterOptions` [API change] * In `Text.Pandoc.UTF8`, add new functions parameterized on `Newline`: `writeFileWith`, `putStrWith`, `putStrLnWith`, `hPutStrWith`, `hPutStrLnWith`. [API change] * Document option in MANUAL.txt. Closes #3663. Closes #2097.
* Markdown writer: Fixed duplicated reference linksJohn MacFarlane2017-05-17
| | | | | | | with `--reference-links` and `--reference-location=section`. Also ensure that there are no empty link references `[]`. Closes #3674.
* Merge pull request #3676 from labdsf/space-charJohn MacFarlane2017-05-17
|\ | | | | Txt2Tags parser: newline is not indentation
| * Txt2Tags parser: newline is not indentationAlexander Krotov2017-05-17
| | | | | | | | space parses '\n', while spaceChar parses only ' ' and '\t'
* | Merge pull request #3677 from labdsf/anylinenewlineJohn MacFarlane2017-05-17
|\ \ | | | | | | Move anyLineNewline to Parsing.hs
| * | Move anyLineNewline to Parsing.hsAlexander Krotov2017-05-17
| |/
* | Org reader: replace `sequence . map` with `mapM`Albert Krewinkel2017-05-16
| |
* | Org reader: put tree parsing code into dedicated moduleAlbert Krewinkel2017-05-16
| |
* | Org reader: add basic file inclusion mechanismAlbert Krewinkel2017-05-14
| | | | | | | | | | | | | | | | | | Support for the `#+INCLUDE:` file inclusion mechanism was added. Recognized include types are *example*, *export*, *src*, and normal org file inclusion. Advanced features like line numbers and level selection are not implemented yet. Closes: #3510
* | Parsing: add `insertIncludedFilesF` which returns F blocksAlbert Krewinkel2017-05-14
| | | | | | | | | | The `insertIncludeFiles` function was generalized and renamed to `insertIncludedFiles'`; the specialized versions are based on that.
* | Parsing: introduce `HasIncludeFiles` type classAlbert Krewinkel2017-05-14
| | | | | | | | | | The `insertIncludeFile` function is generalized to work with all parser states which are instances of that class.
* | Parsing: replace partial with total functionAlbert Krewinkel2017-05-14
|/ | | | | Calling `tail` on an empty list raises an exception, while calling the otherwise equivalent `drop 1` will return the empty list again.
* Merge pull request #3671 from WUUUGI/horizont-spacingJohn MacFarlane2017-05-16
|\ | | | | Added support for horizontal spacing in LaTeX
| * Added support for horizontal spacing in LaTeX: parse \, to \8198 (six-per-em ↵Henri Werth2017-05-15
| | | | | | | | space)
* | Textile reader: fix bug for certain links in table cells.John MacFarlane2017-05-15
| | | | | | | | Closes #3667.
* | Update dates in copyright noticesAlbert Krewinkel2017-05-13
|/ | | | | This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
* Add haddock module description to FB2 writerAlbert Krewinkel2017-05-13
| | | | Copyright, maintainer etc. were missing in haddock docs for this module.
* Change maintainer line in Org writer moduleAlbert Krewinkel2017-05-13
|
* Replace `repeat' and `take' with `replicate' once moreAlexander Krotov2017-05-12
|
* Combine grid table parsersAlbert Krewinkel2017-05-11
| | | | | | | | | | | | | | | The grid table parsers for markdown and rst was combined into one single parser, slightly changing parsing behavior of both parsers: - The markdown parser now compactifies block content cell-wise: pure text blocks in cells are now treated as paragraphs only if the cell contains multiple paragraphs, and as plain blocks otherwise. Before, this was true only for single-column tables. - The rst parser now accepts newlines and multiple blocks in header cells. Closes: #3638
* Markdown writer: missing \n (#3647)David A Roberts2017-05-07
|
* Muse writer: Indent tables with one space (#3649)Alexander Krotov2017-05-07
| | | It is required to trigger Muse table rendering.
* Rename fillMedia -> fillMediaBag.John MacFarlane2017-05-07
|
* PDF: use fillMedia and extractMedia to extract media to tmp dir.John MacFarlane2017-05-07
| | | | | This reduces code duplication. We should be able to do something similar in ODT, Docx, EPUB writers.
* Moved fillMedia, extractMedia from App to Class.John MacFarlane2017-05-07
| | | | Also generalized type of fillMedia to any instance of PandocMonad.
* Added PandocHttpException, trap exceptions in fetching from URLs.John MacFarlane2017-05-07
| | | | Closes #3646.
* Remove https flag.John MacFarlane2017-05-07
| | | | | | | | | Supporting two completely different libraries for fetching from URLs makes it difficult to trap errors, because of different error types expected from the libraries. There's no clear reason not to build with these https-capable libraires.
* fillMediaBag: don't cause fatal error if resource not found.John MacFarlane2017-05-07
| | | | Report warning instead and change image to its alt text.
* Allow `--extract-media` to work with non-binary input formats.John MacFarlane2017-05-07
| | | | | | | | | | | | | | | | | | | | | If `--extract-media` is supplied with a non-binary input format, pandoc will attempt to extract the contents of all linked images, whether in local files, data: uris, or external uris. They will be named based on the sha1 hash of the contents. Closes #1583, #2289. Notes: - One thing that is slightly subideal with this commit is that identical resources will be downloaded multiple times. To improve this we could have mediabag store an original filename/url + a new name. - We might think about reusing some of this code, since more or less the same thing is done in the Docx, EPUB, PDF writers (with slight variations).
* Simplify plumbing for document transformation.John MacFarlane2017-05-07
|
* Markdown reader: improved parsing of indented raw HTML blocks.John MacFarlane2017-05-06
| | | | | | | | | | | | | | | Previously we inadvertently interpreted indented HTML as code blocks. This was a regression. We now seek to determine the indentation level of the contents of an HTML block, and (optionally) skip that much indentation. As a side effect, indentation may be stripped off of raw HTML blocks, if `markdown_in_html_blocks` is used. This is better than having things interpreted as indented code blocks. Closes #1841.
* LaTeX reader: Better handling of comments inside math environments.John MacFarlane2017-05-06
| | | | | | | This solves a problem with commented out `\end{eqnarray}` inside an eqnarray (among other things). Closes #3113.
* Fix keyval funtion: pandoc did not parse options in braces correctly.… (#3642)schrieveslaach2017-05-06
| | | | | | | | * Fix keyval funtion: pandoc did not parse options in braces correctly. Additionally, dot, dash, and colon were no valid characters * Add | as possible option value * Improved code
* Drop redundant import of sortAlbert Krewinkel2017-05-06
| | | | This was left in accidentally.
* Org reader: support macrosAlbert Krewinkel2017-05-06
| | | | Closes: #3401
* Revert "SelfContained: special handling for css @import."John MacFarlane2017-05-05
| | | | This reverts commit 89b3fcc8e050def3779fed716d70bfd4e7120a6b.
* SelfContained: special handling for css @import.John MacFarlane2017-05-05
| | | | | We now avoid creating a data URI for the url under an @import.
* SelfContained: Handle url() inside material retrieved from url().John MacFarlane2017-05-05
| | | | | | | | | | | This can happen e.g. with an @import of a google web font. (What is imported is some CSS which contains an url reference to the font itself.) Also, allow unescaped pipe (|) in URL. This is intended to help with #3629, but it doesn't seem to work.
* Include `backtick_code_blocks` extension in `mardkown_mmd`.John MacFarlane2017-05-04
| | | | Closes #3637.
* Muse writer: omit automatic header identifiers (#3633)Alexander Krotov2017-05-04
|
* Org reader: support table.el tablesAlbert Krewinkel2017-05-03
| | | | Closes #3314
* Generalize tableWith, gridTableWithAlbert Krewinkel2017-05-02
| | | | | | | | The parsing functions `tableWith` and `gridTableWith` are generalized to work with more parsers. The parser state only has to be an instance of the `HasOptions` class instead of requiring a concrete type. Block parsers are required to return blocks wrapped into a monad, as this makes it possible to use parsers returning results wrapped in `Future`s.
* Markdown writer: better escaping for links (#3628)David A Roberts2017-05-03
| | | | | | | Previously the Markdown writer would sometimes create links where there were none in the source. This is now avoided by selectively escaping bracket characters when they occur in a place where a link might be created. Closes #3619.
* LaTeX reader: Add support for tabularx environment (#3632)schrieveslaach2017-05-03
|
* Markdown Writer: put space before reference link definitionsMauro Bieg2017-05-03
| | | | | | | Fixes #3630 (#3631). Previously the attributes in link reference definitions did not have a space preceding.