diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-05-10 22:53:35 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-06-24 20:29:41 -0700 |
commit | f869f7e08dad315945d52be3fcacf6ff0c05c5c1 (patch) | |
tree | 4c426ebf5a30b51499859f9d41a890534b6a18a6 /tests/Tests/Arbitrary.hs | |
parent | e32a8f5981969bb6d0a11bd945188c35817e4d96 (diff) | |
download | pandoc-f869f7e08dad315945d52be3fcacf6ff0c05c5c1.tar.gz |
Use new flexible metadata type.
* 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.
Diffstat (limited to 'tests/Tests/Arbitrary.hs')
-rw-r--r-- | tests/Tests/Arbitrary.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/Tests/Arbitrary.hs b/tests/Tests/Arbitrary.hs index d0000dcee..5939d088d 100644 --- a/tests/Tests/Arbitrary.hs +++ b/tests/Tests/Arbitrary.hs @@ -150,10 +150,13 @@ instance Arbitrary QuoteType where instance Arbitrary Meta where arbitrary - = do x1 <- arbitrary - x2 <- liftM (filter (not . null)) arbitrary - x3 <- arbitrary - return (Meta x1 x2 x3) + = do (x1 :: Inlines) <- arbitrary + (x2 :: [Inlines]) <- liftM (filter (not . isNull)) arbitrary + (x3 :: Inlines) <- arbitrary + return $ setMeta "title" x1 + $ setMeta "author" x2 + $ setMeta "date" x3 + $ nullMeta instance Arbitrary Alignment where arbitrary |