aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests
AgeCommit message (Collapse)AuthorFilesLines
2014-07-31EPUB Reader: Added testsMatthew Pickering1-1/+6
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-29LaTeX writer: use \(..\) instead of $..$ for inline math.John MacFarlane1-1/+1
Closes #1464.
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 Pickering2-0/+434
2014-07-25Fixed runtime error with compactify'DL on certain lists.John MacFarlane1-0/+10
Closes #1452. Added test.
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?
2014-07-20AsciiDoc writer: Double markers in intraword emphasis.John MacFarlane1-3/+22
Closes #1441.
2014-07-17Org reader: Respect :exports header arguments on code blocksCraig S. Bosma1-0/+60
Adds support to the org reader for conditionally exporting either the code block, results block immediately following, both, or neither, depending on the value of the `:exports` header argument. If no such argument is supplied, the default org behavior (for most languages) of exporting code is used.
2014-07-15Docx reader: Add testJesse Rosenthal1-0/+4
Test auto ident header anchors with pandoc-generated pandoc.
2014-07-10Added failing test for issue #1121.John MacFarlane1-0/+2
2014-07-07Added test for issue #1330.John MacFarlane1-0/+6
2014-07-07Reorganized some markdown tests.John MacFarlane1-11/+9
2014-07-07Merge branch 'dokuwiki' of https://github.com/claremacrae/pandoc into ↵John MacFarlane1-0/+7
claremacrae-dokuwiki
2014-07-07Revamped raw HTML block parsing in markdown.John MacFarlane1-1/+1
- We no longer include trailing spaces and newlines in the raw blocks. - We look for closing tags for elements (but without backtracking). - Each block-level tag is its own RawBlock; we no longer try to consolidate them (though `--normalize` will do so). Closes #1330.
2014-07-02DokuWiki writer: Add new test showing that span swallows content.Clare Macrae1-0/+2
2014-07-01Merge branch 'master' of git://github.com/jgm/pandoc into dokuwikiClare Macrae2-3/+9
2014-06-29Rewrote normalize for efficiency. (Closes #1385.)John MacFarlane1-3/+5
* Added normalizeInlines, normalizeBlocks. * Type signature is now more narrow, `Pandoc -> Pandoc` instead of `Data a :: a -> a`. Some users may need to change their uses of `normalize` to the newly exported `normalizeInlines` or `normalizeBlocks`.
2014-06-29Docx reader: Add tests for hanging indent handline.Jesse Rosenthal1-0/+4
We want to treat it as a plain paragraph if the hanging amount is greater to or equal to the left indent---i.e., if the first line has zero indentation. But we still want it to be a block quote if it starts to the right of the margin. Someone might format verse with wrapping lines with a hanging indent, for example.
2014-06-29Merge remote-tracking branch 'jgm/master' into dokuwikiClare Macrae12-62/+1576
2014-06-25Track changes tests.Jesse Rosenthal1-4/+28
2014-06-25Docx reader: Add tests for basic track changesJesse Rosenthal1-0/+10
This is what seems like the sensible default: read in insertions, and ignore deletions. In the future, it would be good if options were available for either taking in deletions or keeping both in some scriptable format.
2014-06-24Docx Reader: add failing defintion list tests.Jesse Rosenthal1-0/+4
2014-06-24Docx reader: add failing tests for inline code and code blocks.Jesse Rosenthal1-0/+9
2014-06-23Merge pull request #1366 from jkr/reducible3John MacFarlane1-0/+4
Docx rewrite and cleanup (in terms of Reducible typeclass)
2014-06-23Add test for correctly trimming spaces in formatting.Jesse Rosenthal1-0/+4
This used to be fixed in the tree-walking. We need to make sure we're doing it right now.
2014-06-23LaTeX writer: Use `\textquotesingle` for `'` in inline code.John MacFarlane1-0/+2
Otherwise we get curly quotes in the PDF output. Closes #1364.
2014-06-22Docx reader tests: add tests for normalization deep in blocks.Jesse Rosenthal1-0/+4
2014-06-22Add normalization test.Jesse Rosenthal1-0/+4
Add torture-test for new normalization functions. One problem that this test demonstrates is that word has a tendency to turn off formatting at a space, and then turn it back on after. I'm not sure yet whether this is something we should fix.
2014-06-20Docx reader tests: Introduce NoNormPandoc type.Jesse Rosenthal1-2/+27
This is just a wrapper around Pandoc that doesn't normalize with `toString`. We want to make sure that our own normalization process works. If, in the future, we are able to hook into the builder's normalization, this will be removed.
2014-06-20LaTeX writer: Fixed strikeout + highlighted code. Closes #1294.John MacFarlane1-1/+11
Previously strikeout highlighted code caused an error.
2014-06-19Add tabs tests.Jesse Rosenthal1-1/+6
2014-06-19Add ReaderOptions to the docx testsJesse Rosenthal1-8/+11
This will allow for testing different media embedding (in addition to any other applicable options.)
2014-06-18Added haddock writer tests.John MacFarlane1-1/+2
2014-06-16Naming: Use Docx instead of DocX.John MacFarlane1-3/+3
For consistency with the existing writer.
2014-06-16Merge branch 'docx' of https://github.com/jkr/pandoc into jkr-docxJohn MacFarlane1-0/+68
2014-06-16Org reader: make tildes create inline code.John MacFarlane1-3/+3
Closes #1345. Also relabeled 'code' and 'verbatim' parsers to accord with the org-mode manual. I'm not sure what the distinction between code and verbatim is supposed to be, but I'm pretty sure both should be represented as Code inlines in pandoc. The previous behavior resulted in the text not appearing in any output format.
2014-06-16Add DocX automated tests.Jesse Rosenthal1-0/+68
Note this makes use of input and output files in the tests/ dir.
2014-05-20Org reader: support for inline LaTeXAlbert Krewinkel1-0/+27
Inline LaTeX is now accepted and parsed by the org-mode reader. Both, math symbols (like \tau) and LaTeX commands (like \cite{Coffee}), can be used without any further escaping.
2014-05-14Org reader: support Pandocs citation extensionAlbert Krewinkel1-0/+22
Citations are defined via the "normal citation" syntax used in markdown, with the sole difference that newlines are not allowed between "[...]". This is for consistency, as org-mode generally disallows newlines between square brackets. The extension is turned on by default and can be turned off via the default syntax-extension mechanism, i.e. by specifying "org-citation" as the input format. Move `citeKey` from Readers.Markdown into Parsing The function can be used by other readers, so it is made accessible for all parsers.
2014-05-10Org reader: Fix block parameter reader, relax constraintsAlbert Krewinkel1-0/+12
The reader produced wrong results for block containing non-letter chars in their parameter arguments. This patch relaxes constraints in that it allows block header arguments to contain any non-space character (except for ']' for inline blocks). Thanks to Xiao Hanyu for noticing this.
2014-05-09Org reader: Fix parsing of blank lines within blocksAlbert Krewinkel1-0/+9
Blank lines were parsed as two newlines instead of just one. Thanks to Xiao Hanyu (@xiaohanyu) for pointing this out.
2014-05-09Org reader: Support arguments for code blocksAlbert Krewinkel1-0/+14
The general form of source block headers (`#+BEGIN_SRC <language> <switches> <header arguments>`) was not recognized by the reader. This patch adds support for the above form, adds header arguments to the block's key-value pairs and marks the block as a rundoc block if header arguments are present. This closes #1286.
2014-05-06Org reader: Read inline code blocksAlbert Krewinkel1-0/+18
Org's inline code blocks take forms like `src_haskell(print "hi")` and are frequently used to include results from computations called from within the document. The blocks are read as inline code and marked with the special class `rundoc-block`. Proper handling and execution of these blocks is the subject of a separate library, rundoc, which is work in progress. This closes #1278.