aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests
AgeCommit message (Collapse)AuthorFilesLines
2013-08-16LaTeX writer: Avoid problem with footnotes in unnumbered headers.John MacFarlane1-0/+6
Closes #940. Added test case.
2013-08-10Added Tests.Walk.John MacFarlane1-0/+47
This verifies that walk and query match the generic traversals.
2013-08-10Adjustments for new Format newtype.John MacFarlane1-4/+4
2013-07-21LaTeX reader: Don't add spurious ", " to citation suffixes.John MacFarlane1-18/+18
This is added when needed in Text.Pandoc.Biblio anyway.
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 MacFarlane4-18/+35
* 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-06-19Added test for #882.John MacFarlane1-0/+5
2013-03-28Added stubs for haddock reader tests.John MacFarlane1-0/+4
Modify tests/haddock-reader.haddock and tests/haddock-reader.native.
2013-03-20Added OPML template, tests.John MacFarlane1-1/+3
Minor fixes to OPML writer. Improved OPML reader tests.
2013-03-19Added Text.Pandoc.Readers.OPML, exporting readOPML.John MacFarlane1-0/+4
The _note attribute is supported. This is unofficial, but used e.g. in OmniOutliner and supported by multimarkdown. We treat the contents as markdown blocks under a section header. Added to documentation and tests.
2013-03-17Markdown writer: New approach for citations.John MacFarlane1-1/+1
* Reverts 1.11 change that caused citations to be rendered as markdown citations, even if `--biblio` was specified, unless `citation` extension is disabled. Now, formatted citations are always printed if `--biblio` was specified. If you want to reformat markdown keeping pandoc markdown citations intact, just don't specify `--biblio`. * Reverted now unnecessary changes to Text.Pandoc.Biblio adding the raw block to mark the bibliography, and to Text.Pandoc.Writers.Markdown to remove the bibliography if `citations` not specified. * If the content of a `Cite` inline is a `RawInline "latex"`, which means that a LaTeX citation command was parsed and `--biblio` wasn't specified, then render it as a pandoc markdown citation. This means that `pandoc -f latex -t markdown`, without `--biblio`, will convert LaTeX citation commands to pandoc markdown citations.
2013-03-17Revert "LaTeX reader: citation handling changes."John MacFarlane2-9/+3
This reverts commit f7229b147314042f946dfded3b441ab0fae260a0.
2013-03-09LaTeX reader: citation handling changes.John MacFarlane2-3/+9
Previously, a LaTeX citation would always be parsed as a Citation element, with the raw LaTeX in the [Inline] part. Now, the LaTeX citation is parsed as a Citation element only if `--biblio` was specified (i.e. only if there is a nonempty set of references in readerReferences). Otherwise it is parsed as raw LaTeX. This will make it possible to simplify some things in the markdown writer. It also makes the LaTeX reader behave more like the Markdown reader.
2013-03-07Markdown writer: Render citations as pandoc-markdown citations.John MacFarlane1-2/+2
Previously citations were rendered as citeproc-formatted citations by default. Now we render them as pandoc citations, e.g. `[@item1]`, unless the `citations` extension is disabled. If you still want formatted citations in your markdown output, use `pandoc -t markdown-citations`.
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 MacFarlane7-70/+42
2013-01-19Get rid of compiler warnings in Tests.Helpers.John MacFarlane1-2/+5
2013-01-15Changed Ext_autolink_urls -> Ext_autolink_bare_uris.John MacFarlane1-1/+1
Added tests.
2013-01-15Added lots of tests for bare URIs.John MacFarlane1-0/+91
2013-01-13RST reader: Line block improvements.John MacFarlane1-2/+2
* Use nonbreaking spaces for initial indent (otherwise lost in HTML and LaTeX). * Allow multiple paragraphs in a single line block.
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-12Fixed/simplified diff output for tests.John MacFarlane1-13/+8
2013-01-09Added Attr field to Header.John MacFarlane3-3/+6
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 MacFarlane2-11/+12
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.)
2013-01-03Updated test runner for changes in pandoc.John MacFarlane1-6/+6
2013-01-02Fixed test suite to use Diff 0.2 API.John MacFarlane1-7/+7
2012-10-28Removed citationSuppressParens.John MacFarlane1-1/+1
Makefile: Use citeproc-0.3.6 release.
2012-10-22LaTeX reader: Initialize citationSuppressParens field.John MacFarlane1-1/+2
2012-10-21Revert "LaTeX reader: Use new suppressParens option for footnote citations."John MacFarlane1-7/+6
This reverts commit 7499499b68934ae6f3418940328c7fc2bd9fcadd. Conflicts: src/Text/Pandoc/Readers/LaTeX.hs
2012-10-15LaTeX reader: Use new suppressParens option for footnote citations.John MacFarlane1-6/+7
Also changed Biblio, Markdown reader, and LaTeX reader tests because of new citationSuppressParens field in Citation.
2012-09-29Renamed removedLeadingTrailingSpace to trim.John MacFarlane1-2/+2
Also removeLeadingSpace to triml, removeTrailingSpace to trimr.
2012-09-25Removed need for utf8-string package.John MacFarlane1-2/+2
* Depend on text. * Expose Text.Pandoc.UTF8. * Text.Pandoc.UTF8 now exports toString, fromString, toStringLazy, fromStringLazy. * These are used instead of the old utf8-string functions.
2012-09-22Markdown reader: Fixed link parser to avoid exponential slowdowns.John MacFarlane1-0/+2
Previously the parser would hang on input like this: [[[[[[[[[[[[[[[[[[hi We fixed this by making the link parser parser characters between balanced brackets (skipping brackets in inline code spans), then parsing the result as an inline list. One change is that [hi *there]* bud](/url) is now no longer parsed as a link. But in this respect pandoc behaved differently from most other implementations anyway, so that seems okay. All current tests pass. Added test for this case. Closes #620.
2012-09-22LaTeX reader: Added a 'try' in rawLaTeXBlock.John MacFarlane1-0/+4
This allows the markdown reader to treat '\begin' (not followed by an argument) as a raw string rather than erroring out when it doesn't find a '{'. Closes #622.
2012-09-21Tests.Old: Set TMP to ".".John MacFarlane1-1/+1
Otherwise TMP is unset and, on Windows, C:\Windows is used by default, leading to permission violations.
2012-09-12Added basic mediawiki reader.John MacFarlane1-1/+6
Text.Pandoc.Readers.MediaWiki module, tests/mediawiki-reader.{txt,native}.
2012-08-08Changes to literate haskell options.John MacFarlane1-1/+3
- Removed writerLiterateHaskell from WriterOptions. - Removed readerLiterateHaskell from ReaderOptions. - Added Ext_literate_haskell to Extensions. Test for this instead of the above. - Removed failUnlessLHS from Shared. Note: At this point, +lhs and .lhs extension no longer has any effect. Need to fix.
2012-07-26Moved WriterOptions and associated types Shared -> Options.John MacFarlane8-18/+16
2012-07-26Moved tests to tests/, modified cabal file so lib isn't recompiled.John MacFarlane12-0/+1098
2011-01-29Moved tests to src.John MacFarlane9-838/+0
2011-01-29Added Tests.Shared with normalize round-trip tests.John MacFarlane1-0/+21
2011-01-29Tests.Arbitrary: don't allow empty list items.John MacFarlane1-3/+5
2011-01-29Removed intentionally failing test in ConTeXt writer tests.John MacFarlane1-2/+2
2011-01-29Added biblatex citation tests to Tests.Readers.LaTeX.John MacFarlane2-21/+46
Removed old biblatex-citations.latex.
2011-01-29Added natbib citation tests to Tests.Readers.LaTeX.John MacFarlane2-1/+65
Removed old tests/natbib-citations.latex.
2011-01-26Added Tests.Readers.Markdown.John MacFarlane1-0/+29
2011-01-26Add support for attributes in inline Code.John MacFarlane1-1/+1
Additional related changes: * URLs in Code in autolinks now use class "url". * Require highlighting-kate 0.2.8.2, which omits the final <br/> tag, essential for inline code.
2011-01-26RST reader: Improved field lists.John MacFarlane1-11/+11
Field lists now work properly with block content. (Thanks to Lachlan Musicman for pointing out the bug.) In addition, definition list items are now always Para instead of Plain -- which matches behavior of rst2xml.py. Finally, in image blocks, the alt attribute is parsed properly and used for the alt, not also the title.
2011-01-26Added RST reader tests.John MacFarlane1-0/+46