summaryrefslogtreecommitdiff
path: root/tests/Tests/Readers/RST.hs
AgeCommit message (Collapse)Author
2017-02-04Moved tests/ -> test/.John MacFarlane
2017-01-25Update all tests to use new readers and error structure.Jesse Rosenthal
2016-10-24Export Text.Pandoc.Error in Text.Pandoc.John MacFarlane
[API change]
2016-10-17RST reader: Add test for space-before-note.Jesse Rosenthal
2016-10-14Remove Tests.ArbitraryJesse Rosenthal
Use exported Arbitrary instances from pandoc-types instead.
2016-10-13Parse line-oriented markup as LineBlockAlbert Krewinkel
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.
2016-05-01Add one more testSidharth Kapur
2016-05-01Use `codeBlockWith`Sidharth Kapur
2016-05-01Add test for RST code directive classSidharth Kapur
2015-12-12Test fixes.John MacFarlane
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane
- The (non-exported) prelude is in prelude/Prelude.hs. - It exports Monoid and Applicative, like base 4.8 prelude, but works with older base versions. - It exports (<>) for mappend. - It hides 'catch' on older base versions. This allows us to remove many imports of Data.Monoid and Control.Applicative, and remove Text.Pandoc.Compat.Monoid. It should allow us to use -Wall again for ghc 7.10.
2015-07-10Removed tabs from source.John MacFarlane
2015-07-03Tests.Readers.RST: Test metadata with inline markup tooLars-Dominik Braun
2015-07-03Tests.Readers.RST: Group field list testsLars-Dominik Braun
2015-07-03Readers.RST: Parse field list nameLars-Dominik Braun
“Inline markup is parsed in field names.” [1] [1] http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#field-lists
2015-06-29Fix RST reference names with special charactersLars-Dominik Braun
2015-02-18Update testsMatthew Pickering
2014-12-12RST Reader: compute Attrs when role is definedDaniel Bergey
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 Bergey
2014-12-01parse RST class directivesDaniel Bergey
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 Bergey
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.
2013-06-24Use new flexible metadata type.John MacFarlane
* 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-01-23Eliminated use of TH in test suite.John MacFarlane
2013-01-13RST reader: Line block improvements.John MacFarlane
* Use nonbreaking spaces for initial indent (otherwise lost in HTML and LaTeX). * Allow multiple paragraphs in a single line block.
2012-07-26Moved tests to tests/, modified cabal file so lib isn't recompiled.John MacFarlane
2011-01-29Moved tests to src.John MacFarlane
2011-01-26RST reader: Improved field lists.John MacFarlane
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 MacFarlane