Added accessors (docTitle, docAuthors, docDate) to Meta type.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1853 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
76ab88807e
commit
36675bd206
11 changed files with 13 additions and 13 deletions
|
@ -36,9 +36,9 @@ import Data.Generics
|
|||
data Pandoc = Pandoc Meta [Block] deriving (Eq, Read, Show, Typeable, Data)
|
||||
|
||||
-- | Bibliographic information for the document: title, authors, date.
|
||||
data Meta = Meta [Inline] -- title
|
||||
[[Inline]] -- list of authors
|
||||
[Inline] -- date
|
||||
data Meta = Meta { docTitle :: [Inline]
|
||||
, docAuthors :: [[Inline]]
|
||||
, docDate :: [Inline] }
|
||||
deriving (Eq, Show, Read, Typeable, Data)
|
||||
|
||||
-- | Alignment of a table column.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] [])
|
||||
Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docAuthors = [], docDate = []})
|
||||
[ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber's",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
|
||||
, HorizontalRule
|
||||
, Header 1 [Str "Headers"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]] [Str "July",Space,Str "17,",Space,Str "2006"])
|
||||
Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docAuthors = [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]], docDate = [Str "July",Space,Str "17,",Space,Str "2006"]})
|
||||
[ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
|
||||
, HorizontalRule
|
||||
, Header 1 [Str "Headers"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [] [] [])
|
||||
Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
|
||||
[ Header 1 [Str "lhs",Space,Str "test"]
|
||||
, Para [Code "unsplit",Space,Str "is",Space,Str "an",Space,Str "arrow",Space,Str "that",Space,Str "takes",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "and",Space,Str "combines",Space,Str "them",Space,Str "to",Space,Str "return",Space,Str "a",Space,Str "single",Space,Str "value:"]
|
||||
, CodeBlock ("",["sourceCode","literate","haskell"],[]) "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry \n -- arr (\\op (x,y) -> x `op` y) "
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [] [] [])
|
||||
Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
|
||||
[ Header 1 [Str "Additional",Space,Str "markdown",Space,Str "reader",Space,Str "tests"]
|
||||
, Header 2 [Str "Blank",Space,Str "line",Space,Str "before",Space,Str "URL",Space,Str "in",Space,Str "link",Space,Str "reference"]
|
||||
, Para [Link [Str "foo"] ("/url",""),Space,Str "and",Space,Link [Str "bar"] ("/url","title")]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str "Subtitle"] [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]] [Str "July",Space,Str "17,",Space,Str "2006"])
|
||||
Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str "Subtitle"], docAuthors = [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]], docDate = [Str "July",Space,Str "17,",Space,Str "2006"]})
|
||||
[ DefinitionList
|
||||
[ ([Str "Revision"],
|
||||
[ [ Plain [Str "3"] ]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [Str "My",Space,Str "S5",Space,Str "Document"] [[Str "Sam",Space,Str "Smith"],[Str "Jen",Space,Str "Jones"]] [Str "July",Space,Str "15,",Space,Str "2006"])
|
||||
Pandoc (Meta {docTitle = [Str "My",Space,Str "S5",Space,Str "Document"], docAuthors = [[Str "Sam",Space,Str "Smith"],[Str "Jen",Space,Str "Jones"]], docDate = [Str "July",Space,Str "15,",Space,Str "2006"]})
|
||||
[ Header 1 [Str "First",Space,Str "slide"]
|
||||
, BulletList
|
||||
[ [ Plain [Str "first",Space,Str "bullet"] ]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [] [] [])
|
||||
Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
|
||||
[ Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption",Str ":"]
|
||||
, Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.125,0.1125,0.1375,0.15]
|
||||
[ [ Plain [Str "Right"] ]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [] [] [])
|
||||
Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
|
||||
[ Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"]
|
||||
, Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax",Str "."] [AlignRight,AlignLeft,AlignCenter,AlignDefault] [0.0,0.0,0.0,0.0]
|
||||
[ [ Plain [Str "Right"] ]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]] [Str "July",Space,Str "17,",Space,Str "2006"])
|
||||
Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docAuthors = [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]], docDate = [Str "July",Space,Str "17,",Space,Str "2006"]})
|
||||
[ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
|
||||
, HorizontalRule
|
||||
, Header 1 [Str "Headers"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]] [Str "July",Space,Str "17,",Space,Str "2006"])
|
||||
Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docAuthors = [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]], docDate = [Str "July",Space,Str "17,",Space,Str "2006"]})
|
||||
[ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
|
||||
, HorizontalRule
|
||||
, Header 1 [Str "Headers"]
|
||||
|
|
Loading…
Reference in a new issue