summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* Org reader: allow figure with empty captionAlbert Krewinkel2016-10-14
| | | | | | | | | A `#+CAPTION` attribute before an image is enough to turn an image into a figure. This wasn't the case because the `parseFromString` function, which processes the caption value, would fail on empty values. Adding a newline character to the caption value fixes this. Fixes: #3161
* Remove Tests.ArbitraryJesse Rosenthal2016-10-14
| | | | Use exported Arbitrary instances from pandoc-types instead.
* Merge pull request #3146 from hubertp-lshift/feature/odt-list-start-valueJohn MacFarlane2016-10-14
|\ | | | | [ODT Parser] Include list's starting value
| * Added tests and a corner case for starting numberHubert Plociniczak2016-10-14
| | | | | | | | | | | | | | | | | | Review revealed that we didn't handle the case when the starting point is an empty string. While this is not a valid .odt file, we simply added a special case to deal with it. Also added tests for the new feature.
* | Parse line-oriented markup as LineBlockAlbert Krewinkel2016-10-13
|/ | | | | | | | Markup-features focusing on lines as distinctive part of the markup are read into `LineBlock` elements. This currently means line blocks in reStructuredText and Markdown (the latter only if the `line_block` extension is enabled), the `linegroup`/`line` combination from the Docbook 5.1 working draft, and Org-mode `VERSE` blocks.
* Markdown writer: add test for note placement.Jesse Rosenthal2016-10-11
|
* AsciiDoc writer: avoid unnecessary use of "unconstrained" emphasis.John MacFarlane2016-10-02
| | | | | | | | In AsciiDoc, you must use a special form of emphasis (double `__`) for intraword emphasis. Pandoc was previously using this more than necessary. Closes #3068.
* Markdown reader: added bracket syntax for native spans.John MacFarlane2016-09-28
| | | | | | | See #168. Text.Pandoc.Options.Extension has a new constructor `Ext_brackted_spans`, which is enabled by default in pandoc's Markdown.
* Updated test suite.John MacFarlane2016-09-28
|
* Merge pull request #3093 from wilx/master-figure-placementJohn MacFarlane2016-09-28
|\ | | | | LaTeX: Do not set [htbp] figure placement options.
| * LaTeX: Do not set [htbp] figure placement options.Vaclav Zeman2016-08-29
| | | | | | | | | | | | Do not set `[htbp]` placement options on each figure to allow overriding them by them using `\fps@figure` redefintion either in header or in template.
* | LaTeX writer: change braced backtick to \textasciigrave{}Jesse Rosenthal2016-09-20
| | | | | | | | | | | | | | Backticks in verbatim environments are converted to open-single-quotes. This change makes them appear as backticks. This corresponds to how we treat `'' in verbatim environments (with \textquotesingle{}).
* | Add test for backtick in verbatim.Jesse Rosenthal2016-09-19
| |
* | Org reader: respect unnumbered header propertyAlbert Krewinkel2016-08-30
| | | | | | | | | | | | | | | | | | | | | | Sections the `unnumbered` property should, as the name implies, be excluded from the automatic numbering of section provided by some output formats. The Pandoc convention for this is to add an "unnumbered" class to the header. The reader treats properties as key-value pairs per default, so a special case is added to translate the above property to a class instead. Closes #3095.
* | Merge branch 'org-meta-handling'Albert Krewinkel2016-08-29
|\ \
| * | Org reader: respect `creator` export optionAlbert Krewinkel2016-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `creator` option controls whether the creator meta-field should be included in the final markup. Setting `#+OPTIONS: creator:nil` will drop the creator field from the final meta-data output. Org-mode recognizes the special value `comment` for this field, causing the creator to be included in a comment. This is difficult to translate to Pandoc internals and is hence interpreted the same as other truish values (i.e. the meta field is kept if it's present).
| * | Org reader: respect `email` export optionAlbert Krewinkel2016-08-29
| | | | | | | | | | | | | | | | | | The `email` option controls whether the email meta-field should be included in the final markup. Setting `#+OPTIONS: email:nil` will drop the email field from the final meta-data output.
| * | Org reader: respect `author` export optionAlbert Krewinkel2016-08-29
| | | | | | | | | | | | | | | | | | The `author` option controls whether the author should be included in the final markup. Setting `#+OPTIONS: author:nil` will drop the author from the final meta-data output.
| * | Put Org reader export option tests into test groupAlbert Krewinkel2016-08-29
| | | | | | | | | | | | | | | Using a separate test group instead of prefixing the test subject should be clearer than the current approach.
| * | Org reader: read HTML_head as header-includesAlbert Krewinkel2016-08-29
| | | | | | | | | | | | | | | | | | HTML-specific head content can be defined in `#+HTML_head` lines. They are parsed as format-specific inlines to ensure that they will only show up in HTML output.
| * | Org reader: set classoption meta from LaTeX_class_optionsAlbert Krewinkel2016-08-29
| | |
| * | Org reader: set documentclass meta from LaTeX_classAlbert Krewinkel2016-08-29
| | |
| * | Org reader: read LaTeX_header as header-includesAlbert Krewinkel2016-08-29
| | | | | | | | | | | | | | | | | | LaTeX-specific header commands can be defined in `#+LaTeX_header` lines. They are parsed as format-specific inlines to ensure that they will only show up in LaTeX output.
| * | Org reader: give precedence to later meta linesAlbert Krewinkel2016-08-29
| | | | | | | | | | | | | | | | | | The last meta-line of any given type is the significant line. Previously the value of the first line was kept, even if more lines of the same type were encounterd.
| * | Org reader: allow multiple, comma-separated authorsAlbert Krewinkel2016-08-29
| | | | | | | | | | | | | | | Multiple authors can be specified in the `#+AUTHOR` meta line if they are given as a comma-separated list.
| * | Org reader: read markup only for special meta keysAlbert Krewinkel2016-08-29
| |/ | | | | | | | | Most meta-keys should be read as normal string values, only a few are interpreted as marked-up text.
* / Docx reader: test for nested anchor spans in headerJesse Rosenthal2016-08-29
|/ | | | | This ensures that anchor spans in header with content (or with other anchor spans inside) will resolve to links to a header id properly.
* Org writer: ensure link targets are paths or URLsAlbert Krewinkel2016-08-18
| | | | | | Org-mode treats links as document internal searches unless the link target looks like a URL or file path, either relative or absolute. This change ensures that this is always the case.
* Org writer: ensure blank line after figureAlbert Krewinkel2016-08-18
| | | | | | An Org-mode figure should be surrounded by blank lines. The figure would be recognized regardless, but images in the following line would unintentionally be treated as figures as well.
* Org writer: remove blank line after figure captionAlbert Krewinkel2016-08-18
| | | | | Org-mode only treats an image as a figure if it is directly preceded by a caption.
* Docx writer test: comment out function to make compiler happy.Jesse Rosenthal2016-08-15
|
* Docx writer: test for custom styles.Jesse Rosenthal2016-08-15
| | | | | | | | This just tests whether a custom style with a recognizable style (italic etc, defined in a reference.docx) will roundtrip back to that format (i.e., whether `<span custom-style="Emphasized">` will roundtrip to `Emph`). The custom styles are defined in the `custom-style-reference.docx` included in the docx dir.
* Docx writer tests: allow for altered round tripJesse Rosenthal2016-08-15
| | | | | | Sometimes we will want to get back something different than we started with in a round-trip test. This allows for that, and makes the perfect roundtrip a special case.
* Merge pull request #3065 from tarleb/org-verse-indentJohn MacFarlane2016-08-09
|\ | | | | Org reader: preserve indentation of verse lines
| * Org reader: preserve indentation of verse linesAlbert Krewinkel2016-08-08
| | | | | | | | | | | | | | Leading spaces in verse lines are converted to non-breaking spaces, so indentation is preserved. This fixes #3064.
* | Org reader: ensure image sources are proper linksAlbert Krewinkel2016-08-09
|/ | | | | | | | | | | | | Image sources as those in plain images, image links, or figures, must be proper URIs or relative file paths to be recognized as images. This restriction is now enforced for all image sources. This also fixes the reader's usage of uncleaned image sources, leading to `file:` prefixes not being deleted from figure images (e.g. `[[file:image.jpg]]` leading to a broken image `<img src="file:image.jpg"/>) Thanks to @bsag for noticing this bug.
* Textile reader: disallow empty URL in explicit link.John MacFarlane2016-07-22
| | | | Closes #3036.
* Added test for extended code block in textile.John MacFarlane2016-07-22
| | | | Closes #3037.
* Textile reader: support `bc..` extended code blocks.John MacFarlane2016-07-22
| | | | | Also, remove trailing newline in code blocks (consistently with Markdown reader).
* Removed some redundant class constraints.John MacFarlane2016-07-14
|
* Org reader: fix parsing of verbatim inlinesAlbert Krewinkel2016-07-14
| | | | | | | | | | Org rules for allowed characters before or after markup chars were not checked for verbatim text. This resultet in wrong parsing outcomes of if the verbatim text contained e.g. space enclosed markup characters as part of the text (`=is_substr = True=`). Forcing the parser to update the positions of allowed/forbidden markup border characters fixes this. This fixes #3016.
* Org writer: improve Div handlingAlbert Krewinkel2016-07-05
| | | | | | | | | | | | | Div blocks handling is changed to make the output look more like idiomatic org mode: - Div-wrapped content is output as-is if the div's attribute is the null attribute. - Div containers with an id but neither classes nor key-value pairs are unwrapped and the id is added as an anchor. - Divs with classes associated with greater block elements are wrapped in a `#+BEGIN`...`#+END` block. - The old behavior for Divs with more complex attributes is kept.
* Org reader: support headline levels export settingAlbert Krewinkel2016-07-03
| | | | | The depths of headlines can be modified using the `H` option. Deeper headlines will be converted to lists.
* Org reader: support archived trees export optionsAlbert Krewinkel2016-07-01
| | | | | | | Handling of archived trees can be modified using the `arch` option. Archived trees are either dropped, exported completely, or collapsed to include just the header when the `arch` option is nil, non-nil, or `headline`, respectively.
* Added Zim Wiki writer, template and tests.Alex Ivkin2016-06-30
|
* LaTeX reader: fixed `\cite` so it is a NormalCitation not AuthorInText.John MacFarlane2016-06-29
|
* Merge pull request #3001 from tarleb/org-figure-labelJohn MacFarlane2016-06-26
|\ | | | | Org reader: support figure labels
| * Org reader: support figure labelsAlbert Krewinkel2016-06-26
| | | | | | | | | | | | | | | | Figure labels given as `#+LABEL: thelabel` are used as the ID of the respective image. This allows e.g. the LaTeX to add proper `\label` markup. This fixes half of #2496 and #2999.
* | Fixed RST links with no explicit link text.John MacFarlane2016-06-25
|/ | | | | | | | | | | | | | | | | | | | The link `<foo>`_ should have `foo` as both its link text and its URL. See RST spec at <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#embedded-uris-and-aliases> "The reference text may also be omitted, in which case the URI will be duplicated for use as the reference text. This is useful for relative URIs where the address or file name is also the desired reference text: See `<a_named_relative_link>`_ or `<an_anonymous_relative_link>`__ for details." Closes Debian #828167 -- reported by Christian Heller.
* Textile reader: fixed attributes.John MacFarlane2016-06-23
| | | | | | | | | | | | | | Attributes can't be followed by a space. So, _(class)emph_ but _(noclass) emph_ Closes #2984.