aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
AgeCommit message (Collapse)AuthorFilesLines
2015-02-18Allow digit as first character of a citation key.Matthias C. M. Troffaes1-0/+22
* Update parser to recognize citation keys starting with a digit. * Update documentation accordingly. * Test case added. See https://github.com/jgm/pandoc-citeproc/issues/97
2015-02-13Docx reader: test lists in table cells.Jesse Rosenthal1-0/+4
2015-01-21Docx Reader: Add test for VML images.Jesse Rosenthal1-0/+4
Since images are often visually (not structurally) placed on the page, people might not always get the results they're looking for here.
2014-12-15Merge pull request #1805 from bergey/rstJohn MacFarlane1-18/+37
RST Reader - Improved Role Support
2014-12-14Merge pull request #1813 from tarleb/file-linksJohn MacFarlane1-1/+8
Org reader: properly handle links to `file:target`
2014-12-14Org reader: properly handle links to `file:target`Albert Krewinkel1-1/+8
Org links like `[[file:target][title]]` were not handled correctly, parsing the link target verbatim. The org reader is changed such that the leading `file:` is dropped from the link target. This is related to issues #756 and #1812.
2014-12-14Fixe autolinks with following punctuation.John MacFarlane1-0/+5
Closes #1811. The price of this is that autolinked bare URIs can no longer contain `>` characters, but this is not a big issue.
2014-12-12RST Reader: compute Attrs when role is definedDaniel Bergey1-1/+1
Move recursive role lookup from renderRole to addNewRole. The Attr value will be the same for every occurance of this role, so there's no reason to compute it every time. This allows simplifying the stateRstCustomRoles map considerably. We could go even further, and remove the fmt and attr arguments to renderRole, which are null except for custom roles.
2014-12-12WIP: tests for RST rolesDaniel Bergey1-18/+37
2014-12-01parse RST class directivesDaniel Bergey1-0/+6
The class directive accepts one or more class names, and creates a Div value with those classes. If the directive has an indented body, the body is parsed as the children of the Div. If not, the first block folowing the directive is made a child of the Div. This differs from the behavior of rst2xml, which does not create a Div element. Instead, the specified classes are applied to each child of the directive. However, most Pandoc Block constructors to not take an Attr argument, so we can't duplicate this behavior.
2014-12-01parse RST quoted literal blocksDaniel Bergey1-1/+16
closes #65 RST quoted literal blocks are the same as indented literal blocks (which pandoc already supports) except that the quote character is preserved in each line. This includes test cases for the quoted literal block, as well as additional tests for line blocks and indented literal blocks, to verify that these are unaffected by the changes.
2014-11-13Fixed bug in org with bulleted lists:John MacFarlane1-0/+7
- a - b * c was being parsed as a list, even though an unindented `*` should make a heading. See <http://orgmode.org/manual/Plain-lists.html#fn-1>.
2014-11-12Merge pull request #1645 from neongreen/issue1636John MacFarlane1-0/+12
Fix 'Ext_lists_without_preceding_blankline' bug.
2014-11-05Org reader: allow empty links for gitit interopAlbert Krewinkel1-0/+4
While empty links are not allowed in Emacs org-mode, Pandoc org-mode should support them: gitit relies on empty links as they are used to create wiki links. Fixes jgm/gitit#471
2014-11-05Org reader: absolute, relative paths in linksAlbert Krewinkel1-0/+8
The org reader was to restrictive when parsing links, some relative links and links to files given as absolute paths were not recognized correctly. The org reader's link parsing function was amended to handle such cases properly. This fixes #1741
2014-10-25Docx test: Remove Danish header test.Jesse Rosenthal1-4/+0
Redundant, now that we're testing for a more generalized sort of internationalized blocks.
2014-10-25Docx reader: add tests for i18n headers.Jesse Rosenthal1-0/+4
This tests blockquotes and headers in Russian. Previous tests make sure that this doesn't produce a regression in en-us Header and Blockquotes.
2014-10-20Org reader: parse LaTeX-style MathML entitiesAlbert Krewinkel1-0/+12
Org supports special symbols which can be included using LaTeX syntax, but are actually MathML entities. Examples for this are `\nbsp` (non-breaking space), `\Aacute` (the letter A with accent acute) or `\copy` (the copyright sign ©). This fixes #1657.
2014-10-18Merge pull request #1680 from shelf/masterJohn MacFarlane1-0/+37
Respect indent when parsing Org bullet lists
2014-10-18Merge pull request #1700 from tarleb/org-emphasis-fixJohn MacFarlane1-0/+8
Org reader: fix rules for emphasis recognition
2014-10-18Org reader: Drop COMMENT document treesAlbert Krewinkel1-0/+12
Document trees under a header starting with the word `COMMENT` are comment trees and should not be exported. Those trees are dropped silently. This closes #1678.
2014-10-18Org reader: fix rules for emphasis recognitionAlbert Krewinkel1-0/+8
Things like `/hello,/` or `/hi'/` were falsy recognized as emphasised strings. This is wrong, as `,` and `'` are forbidden border chars and may not occur on the inner border of emphasized text. This patch enables the reader to matches the reference implementation in that it reads the above strings as plain text.
2014-10-17Fix indent issue for definition listsTimothy Humphries1-0/+10
Tidy up fix for #1650, #1698 as per comments in #1680. Fix same issue for definition lists with the same method.
2014-10-12Respect indent when parsing Org bullet listsTimothy Humphries1-0/+27
Fixes issue with top-level bullet list parsing. Previously we would use `many1 spaceChars` rather than respecting the list's indent level. We also permitted `*` bullets on unindented lists, which should unambiguously parse as `header 1`. Combined, this meant headers at a different indent level were being unwittingly slurped into preceding bullet lists, as per Issue #1650.
2014-09-27Merge pull request #1601 from jkr/windowsfixJohn MacFarlane1-2/+1
Fix path-slashes inside archive for windows
2014-09-27Update tests for #1649Matthew Pickering1-1/+3
2014-09-26Fix 'Ext_lists_without_preceding_blankline' bug.Artyom1-0/+12
* Fixes #1636. * Adds a test.
2014-09-25EPUB Tests: Seperating image testing from other featuresmpickering1-2/+3
2014-09-05Docx reader: Add test for polyglot headers.Jesse Rosenthal1-0/+4
Only Danish at the moment.
2014-09-04Org reader: Update TestsJesse Rosenthal1-1/+5
Test for markup after blank line.
2014-09-04Docx Reader: Add tests for numbered headers.Jesse Rosenthal1-0/+4
2014-09-02Docx reader: Modify mediabag test accordingly.Jesse Rosenthal1-2/+1
2014-08-31Markdown reader: better handling of paragraph in div.John MacFarlane1-2/+2
Previously text that ended a div would be parsed as Plain unless there was a blank line before the closing div tag. Test case: <div class="first"> This is a paragraph. This is another paragraph. </div> Closes #1591.
2014-08-20Txt2Tags reader: Header is now parsed only if standalone flag is setmpickering1-1/+1
2014-08-16Docx reader: Test for character styles.Jesse Rosenthal1-0/+4
2014-08-13Revised tests directory.John MacFarlane2-62/+62
Renamed some tests, introducing subsidiary directories for fb2, docx, epub. Cleaned up tests in cabal file. Combined dokuwiki-writer and dokuwiki_inline_formatting tests.
2014-08-11Docx: Add dropcap tests.Jesse Rosenthal1-4/+6
2014-08-10Improved EPUB TestsMatthew Pickering1-0/+33
Rewrote features test to remove all unimplemented features. There are now all three examples of where an image can be included in the test. 1. Cover image 2. As a spine elemnt 3. In the document Tests have also been added to make sure that the mediabag contains all these images after processing.
2014-08-07Docx reader: Test inline image code.Jesse Rosenthal1-1/+5
2014-07-31Docx tests: rewrite mediabag tests.Jesse Rosenthal1-19/+40
This will allow us to test the whole mediabag (making sure, for example, that images are added with the correct keys) instead of just individual extracted images. We compare each entry in the media bag to an image extracted on the fly from the docx. As a result, we only need one file to test with. The image in the current tests was also replaced with a smaller one.
2014-07-31New module, Text.Pandoc.MediaBag.John MacFarlane1-1/+1
Moved `MediaBag` definition and functions from Shared: `lookupMedia`, `mediaDirectory`, `insertMedia`, `extractMediaBag`. Removed `emptyMediaBag`; use `mempty` instead, since `MediaBag` is a Monoid.
2014-07-31Made MediaBag a newtype, and added mime type information to media.John MacFarlane1-2/+3
Shared now exports functions for interacting with a MediaBag: - `emptyMediaBag` - `lookuMedia` - `insertMedia` - `mediaDirectory` - `extractMediaBag`
2014-07-30Docx test: Test image from media bag.Jesse Rosenthal1-0/+7
2014-07-30Docx tests: Added media test comparison function.Jesse Rosenthal1-0/+19
Also tell pandoc.cabal that we'll be needing base64, since we want to compare strings here.
2014-07-30Docx reader: change tests to make use of media bag.Jesse Rosenthal1-1/+2
2014-07-29Add and update docx tests in pandoc.cabal.Jesse Rosenthal1-4/+0
2014-07-29Docx reader: Make metavalues out of styled paragraphs.Jesse Rosenthal1-0/+15
This will make paragraphs styled with `Author`, `Title`, `Subtitle`, `Date`, and `Abstract` into pandoc metavalues, rather than text. The implementation only takes those elements from the beginning of the document (ignoring empty paragraphs). Multiple paragraphs in the `Author` style will be made into a metaList, one paragraph per item. Hard linebreaks (shift-return) in the paragraph will be maintained, and can be used for institution, email, etc.
2014-07-27Txt2Tags Reader: Added testsMatthew Pickering1-0/+430
2014-07-20Markdown reader: revised definition list syntax (closes #1429).John MacFarlane1-0/+41
* This change brings pandoc's definition list syntax into alignment with that used in PHP markdown extra and multimarkdown (with the exception that pandoc is more flexible about the definition markers, allowing tildes as well as colons). * Lazily wrapped definitions are now allowed; blank space is required between list items; and the space before definition is used to determine whether it is a paragraph or a "plain" element. * For backwards compatibility, a new extension, `compact_definition_lists`, has been added that restores the behavior of pandoc 1.12.x, allowing tight definition lists with no blank space between items, and disallowing lazy wrapping.
2014-07-20Org reader: text adjacent to a list yields a Plain, not Para.John MacFarlane1-7/+7
This gives better results for tight lists. Closes #1437. An alternative solution would be to use Para everywhere, and never Plain. I am not sufficiently familiar with org to know which is best. Thoughts, @tarleb?