aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Writers
AgeCommit message (Collapse)AuthorFilesLines
2014-09-09LaTeX writer: Test for protecting images in header.Jesse Rosenthal1-0/+3
2014-08-31LaTeX writer: Add tests for header-in-item.Jesse Rosenthal1-0/+7
2014-08-03Correctly implement capitalisation.Artyom Kazak1-0/+21
Using `map toUpper` to capitalise text is wrong, as e.g. “Straße” should be converted to “STRASSE”, which is 1 character longer. This commit adds a `capitalize` function and replaces 2 identical implementations in different modules (`toCaps` and `capitalize`) with it.
2014-07-29LaTeX writer: use \(..\) instead of $..$ for inline math.John MacFarlane1-1/+1
Closes #1464.
2014-07-20AsciiDoc writer: Double markers in intraword emphasis.John MacFarlane1-3/+22
Closes #1441.
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-20LaTeX writer: Fixed strikeout + highlighted code. Closes #1294.John MacFarlane1-1/+11
Previously strikeout highlighted code caused an error.
2014-05-03Added Tests.Writer.AsciiDoc to repository.John MacFarlane1-0/+37
2014-05-03Distinguish tight and loose lists in Docbook outputNeil Mayhew1-11/+188
Determined by the first block of the first item being Plain.
2014-04-12Add some unit tests for Writers.DocbookNeil Mayhew1-0/+52
These are primarily aimed at testing the new treatment of line breaks, but hopefully other tests can be added more easily now as features and changes are implemented in the writer. Adapted from Tests.Writers.HTML.tests.
2013-11-30Markdown writer: Fix rendering of tight sublists.John MacFarlane1-0/+4
E.g. - foo - bar - baz Previously a spurious blank line was included before the last item. Closes #1050.
2013-10-21Fix definition lists with internal links in terms (closes #1032).John MacFarlane1-0/+5
This fix puts braces around a term that contains an internal link, to avoid problems with square brackets.
2013-08-22Write id for code block to label attr in latex when listing is usedFlorian Eitel1-0/+7
The code: ~~~{#test} asdf ~~~ gets compiled to html: <pre id="test"> asdf </pre> So it is possible to link to the identifier `test` But this doesn't happen on latex When using the listings package (`--listings`) it is possible to set the identifier using the `label=test` property: \begin{lstlisting}[label=id] hi \end{lstlisting} And this is exactly what this patch is doing. Modified LaTeX Reader/Writer and added tests for this.
2013-08-16LaTeX writer: Avoid problem with footnotes in unnumbered headers.John MacFarlane1-0/+6
Closes #940. Added test case.
2013-07-13Updated a test whose output changed due to last commit.John MacFarlane1-4/+1
2013-06-26Stop escaping `|` in LaTeX math.John MacFarlane1-1/+1
This caused problems with array environments. Closes #891.
2013-06-24Use new flexible metadata type.John MacFarlane1-1/+1
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-03-05Hide Text.Pandoc.Highlighting.John MacFarlane1-1/+1
* Moved code for translating listings language names to highlighting-kate names and back from LaTeX reader to Highlighting. * Text.Pandoc.Highlighting no longer exposed (API change) * Text.Pandoc.Highlighting exports toListingsLang, fromListingsLang
2013-01-23Eliminated use of TH in test suite.John MacFarlane4-21/+21
2013-01-12Escape `|` as `\vert` in LaTeX math.John MacFarlane1-0/+4
This avoids a clash with highlighting-kate's macros, which redefine | as a short verbatim delimiter. Thanks to Björn Peemöller for raising this issue.
2013-01-09Added Attr field to Header.John MacFarlane1-1/+1
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2013-01-07Updated tests for tight/loose lists.John MacFarlane1-9/+10
Taking into account new context/latex output, and fixing some bugs in the test suite Tests.Helpers and Tests.Writers.ConTeXt. (We had the wrong order of expected/actual in the diff output.)
2012-07-26Moved WriterOptions and associated types Shared -> Options.John MacFarlane5-8/+7
2012-07-26Moved tests to tests/, modified cabal file so lib isn't recompiled.John MacFarlane5-0/+206
2011-01-29Moved tests to src.John MacFarlane2-92/+0
2011-01-29Removed intentionally failing test in ConTeXt writer tests.John MacFarlane1-2/+2
2011-01-26Updates for compiling with ghc 7.John MacFarlane1-1/+1
We now use a CPP trick to have compatible quasiquotes that work in both GHC 6.12 and 7.
2011-01-22Use ANSI color to point to diffs in test output.John MacFarlane1-2/+2
ConTeXt writer bullet list test set to break as an example.
2011-01-22Added native writer tests.John MacFarlane1-0/+20
2011-01-22Added 'property' in Tests.Helpers & some quickcheck tests.John MacFarlane1-0/+12
2011-01-22Improved test framework.John MacFarlane1-12/+43
Now there is a uniform interface for reader and writer tests. Also added a quasiquoter, for multiline strings.
2011-01-21More informative output on writer test failure.John MacFarlane1-6/+6
2011-01-21Added Tests.Writers.ConTeXt and helpers for writer tests.John MacFarlane1-0/+29