summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
Commit message (Collapse)AuthorAge
...
* 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.
* Added PandocResourceNotFound error.John MacFarlane2017-05-02
| | | | | | | Use this instead of PandocIOError when a resource is not found in path. This improves the error message in this case, see #3629.
* Markdown writer: Case-insensitive reference links. (#3616)David A Roberts2017-05-02
| | | | | | | | | Ensure that we do not generate reference links whose labels differ only by case. Also allow implicit reference links when the link text and label are identical up to case. Closes #3615.
* FB2 writer: Add support for "lang" metadata (#3625)Alexander Krotov2017-05-02
|
* Lua filter: fall-back to global filters when none is returnedAlbert Krewinkel2017-04-30
| | | | | | | | | The implicitly defined global filter (i.e. all element filtering functions defined in the global lua environment) is used if no filter is returned from a lua script. This allows to just write top-level functions in order to define a lua filter. E.g function Emph(elem) return pandoc.Strong(elem.content) end
* Lua module: simplify Attributes, rename to AttrAlbert Krewinkel2017-04-30
| | | | | | | Attributes was written to behave much like a normal table, in order to simplify working with it. However, all Attr containing elements were changed to provide panflute-like accessors to Attr components, rendering the previous approach unnecessary.
* Lua module: make Header argument order consistentAlbert Krewinkel2017-04-30
| | | | | Attributes are always passed as the last element, making it possible to omit this argument. Argument order for `Header` was wrong and is fixed.
* Provide shared F monad functions for Markdown and Org readersAlbert Krewinkel2017-04-30
| | | | | | The `F` monads used for delayed evaluation of certain values in the Markdown and Org readers are based on a shared data type capturing the common pattern of both `F` types.
* Add returnF to Text.Pandoc.ParsingAlexander Krotov2017-04-30
|
* Org reader: Avoid creating nullMeta by applying setMeta directlyAlexander Krotov2017-04-30
|
* LaTeX writer: Fix problem with escaping in lstinline.John MacFarlane2017-04-29
| | | | | | | | | | | | | | | | | | Previously the LaTeX writer created invalid LaTeX when `--listings` was specified and a code span occured inside emphasis or another construction. This is because the characters `%{}\` must be escaped in lstinline when the listinline occurs in another command, otherwise they must not be escaped. To deal with this, adoping Michael Kofler's suggestion, we always wrap lstinline in a dummy command `\passthrough`, now defined in the default template if `--listings` is specified. This way we can consistently escape the special characters. Closes #1629.
* LaTeX writer: don't use lstinline it \item[..].John MacFarlane2017-04-28
| | | | | | | If you do, the contents of item disappear or are misplaced. Use `\texttt` instead. Closes #645.
* Ms writer: make use of already defined render' (#3613)Alexander Krotov2017-04-28
|
* Muse writer: Do not reflow directives (#3614)Alexander Krotov2017-04-28
| | | | Directives at the beginning of documents cannot span multiple lines so they must not be reflown.
* Lua module: provide simple `read` format parserAlbert Krewinkel2017-04-26
| | | | | | A single `read` function parsing pandoc-supported formats is added to the module. This is simpler and more convenient than the previous method of exposing all reader functions individually.
* API change: move writer functions to Text.Pandoc.WritersAlbert Krewinkel2017-04-26
| | | | | | Writer helper functions were defined in the top-level Text.Pandoc module. These functions are moved to the Writer submodule as to enable reuse in other submodules.
* API change: move reader functions to Text.Pandoc.ReadersAlbert Krewinkel2017-04-26
| | | | | | Reader helper functions were defined in the top-level Text.Pandoc module. These functions are moved to the Readers submodule as to enable reuse in other submodules.
* API change: move extension handling to Text.Pandoc.ExtensionsAlbert Krewinkel2017-04-26
| | | | | | Extension parsing and processing functions were defined in the top-level Text.Pandoc module. These functions are moved to the Extensions submodule as to enable reuse in other submodules.
* Lua filter: allow filtering of meta data onlyAlbert Krewinkel2017-04-26
|
* Lua filter: allow natural access to meta elementsAlbert Krewinkel2017-04-26
| | | | | | | | Meta elements that are treated as lua tables (i.e. MetaList, MetaInlines, MetaBlocks, and MetaMap), are no longer wrapped in an additional table but simply marked via a metatable. This allows treating those meta values just like normal tables, while still making empty elements of those values distinguishable.
* LaTeX reader: Add basic support for hyphenat package (#3603)schrieveslaach2017-04-26
|
* Simplify linkText in Text.Pandoc.Readers.TWiki (#3605)Alexander Krotov2017-04-26
| | | | Avoid constructing list of one element ([B.str url]) just to flatten it back with mconcat.
* LaTeX reader: Add support for \vdots (#3607)schrieveslaach2017-04-26
|
* HTML line block: Use class instead of style attribute.John MacFarlane2017-04-25
| | | | | | | | | We now issue `<div class="line-block">` and include a default definition for `line-block` in the default templates, instead of hard-coding a `style` on the div. Closes #1623.
* LaTeX writer: fix error with line breaks after empty content.John MacFarlane2017-04-25
| | | | | | | LaTeX requires something before a line break, so we insert a `~` if no printable content has yet been emitted. Closes #2874.
* LaTeX reader: better support for subfigure package.John MacFarlane2017-04-24
| | | | | | | | A figure with two subfigures turns into two pandoc figures; the subcaptions are used and the main caption ignored, unless there are no subcaptions. Closes #3577.
* TWiki reader: remove unnecessary $ (#3597)Alexander Krotov2017-04-24
|
* Org reader: allow multi-word arguments to src block paramsAlbert Krewinkel2017-04-23
| | | | | | | The reader now correctly parses src block parameter list even if parameter arguments contain multiple words. Closes: #3477
* Org reader: stop adding rundoc prefix to src paramsAlbert Krewinkel2017-04-23
| | | | | | | | | | | Source block parameter names are no longer prefixed with *rundoc*. This was intended to simplify working with the rundoc project, a babel runner. However, the rundoc project is unmaintained, and adding those markers is not the reader's job anyway. The original language that is specified for a source element is now retained as the `data-org-language` attribute and only added if it differs from the translated language.
* Org reader: handle line numbering switch for src blocksAlbert Krewinkel2017-04-23
| | | | | | | The line-numbering switch that can be given to source blocks (`-n` with an start number as an optional parameter) is parsed and translated to a class/key-value combination used by highlighting and other readers and writers.
* HTML reader: Revise treatment of li with id attribute.John MacFarlane2017-04-23
| | | | | | | | | | | | | | | | Previously we always added an empty div before the list item, but this created problems with spacing in tight lists. Now we do this: If the list item contents begin with a Plain block, we modify the Plain block by adding a Span around its contents. Otherwise, we add a Div around the contents of the list item (instead of adding an empty Div to the beginning, as before). Closes #3596.
* Add siunitx Support (#3588)schrieveslaach2017-04-22
| | | | | | | | | | | For example: ```latex \SI[round-precision=2]{1}{m} is equal to \SI{1000}{mm}. \SI[round-precision=2]{1}[\$]{} is equal to \SI{0.938094}{\euro} ```
* Lua: drop useless filter function type parameterAlbert Krewinkel2017-04-18
| | | | | The return-type parameter for lua filter functions is removed. It only complicated the code without introducing any additional type safety.
* Org reader: allow emphasized text to be followed by `[`Albert Krewinkel2017-04-16
| | | | Closes: #3577
* Read image size of Inkscape SVGs (#3580)schrieveslaach2017-04-16
|
* Org reader: convert markup at beginning of footnotesAlbert Krewinkel2017-04-16
| | | | Closes: #3576
* Lua filter: revert to non-destructuring filtersAlbert Krewinkel2017-04-15
| | | | | We want to provide an interface familiar to users of other filtering libraries.