diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Old.hs | 4 | ||||
-rw-r--r-- | test/Tests/Readers/Creole.hs | 15 | ||||
-rw-r--r-- | test/Tests/Readers/Muse.hs | 1 | ||||
-rw-r--r-- | test/Tests/Readers/Txt2Tags.hs | 1 | ||||
-rw-r--r-- | test/command/3596.md | 6 | ||||
-rw-r--r-- | test/command/4007.md | 23 | ||||
-rw-r--r-- | test/command/4012.md | 8 | ||||
-rw-r--r-- | test/command/4016.md | 47 | ||||
-rw-r--r-- | test/command/4019.md | 8 | ||||
-rw-r--r-- | test/command/latex-command-comment.md | 7 | ||||
-rw-r--r-- | test/creole-reader.native | 95 | ||||
-rw-r--r-- | test/creole-reader.txt | 137 | ||||
-rw-r--r-- | test/fb2/basic.fb2 | 2 | ||||
-rw-r--r-- | test/writer.fb2 | 238 | ||||
-rw-r--r-- | test/writer.jats | 12 |
15 files changed, 480 insertions, 124 deletions
diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs index 27bb20b4b..9c6b9f660 100644 --- a/test/Tests/Old.hs +++ b/test/Tests/Old.hs @@ -156,6 +156,10 @@ tests = [ testGroup "markdown" , testGroup "ms" [ testGroup "writer" $ writerTests "ms" ] + , testGroup "creole" + [ test "reader" ["-r", "creole", "-w", "native", "-s"] + "creole-reader.txt" "creole-reader.native" + ] ] -- makes sure file is fully closed after reading diff --git a/test/Tests/Readers/Creole.hs b/test/Tests/Readers/Creole.hs index 96517c25c..3a21df738 100644 --- a/test/Tests/Readers/Creole.hs +++ b/test/Tests/Readers/Creole.hs @@ -127,6 +127,11 @@ tests = [ =?> bulletList [ plain "foo" <> bulletList [ plain "bar", plain "baz" ] , plain "blubb" ] + , "nested unordered list, one separating space, trailing space" =: + "* foo \n** bar \n** baz \n* blubb " + =?> bulletList [ plain "foo" + <> bulletList [ plain "bar", plain "baz" ] + , plain "blubb" ] , "ordered list, two entries, one separating space" =: "# foo\n# bar" =?> orderedList [ plain "foo", plain "bar" ] @@ -141,6 +146,11 @@ tests = [ =?> orderedList [ plain "foo" <> orderedList [ plain "bar", plain "baz" ] , plain "blubb" ] + , "nested ordered list, one separating space, trailing space" =: + "# foo \n## bar \n## baz \n# blubb " + =?> orderedList [ plain "foo" + <> orderedList [ plain "bar", plain "baz" ] + , plain "blubb" ] , "nested many ordered lists, one separating space" =: ("# foo\n## bar\n### third\n### third two\n## baz\n### third again\n" <> "#### fourth\n##### fith\n# blubb") @@ -193,7 +203,10 @@ tests = [ , "forced line breaks" =: "{{{no break!\\\\here}}} but a break\\\\here!" =?> para (code "no break!\\\\here" <> " but a break" - <> linebreak <> "here!") + <> linebreak <> "here!"), + "quoted block, after trailing white space" =: + "this is a paragraph \n{{{\nfoo bar\n //baz//\n}}}" + =?> para "this is a paragraph" <> codeBlock "foo bar\n //baz//" ] , testGroup "Images and Links" [ "image simple" =: diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 158f5788e..1469b01a0 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -9,7 +9,6 @@ import Tests.Helpers import Text.Pandoc import Text.Pandoc.Arbitrary () import Text.Pandoc.Builder -import Text.Pandoc.Class muse :: Text -> Pandoc muse = purely $ \s -> do diff --git a/test/Tests/Readers/Txt2Tags.hs b/test/Tests/Readers/Txt2Tags.hs index e3c4d0643..28f647de4 100644 --- a/test/Tests/Readers/Txt2Tags.hs +++ b/test/Tests/Readers/Txt2Tags.hs @@ -9,7 +9,6 @@ import Tests.Helpers import Text.Pandoc import Text.Pandoc.Arbitrary () import Text.Pandoc.Builder -import Text.Pandoc.Class import Text.Pandoc.Shared (underlineSpan) t2t :: Text -> Pandoc diff --git a/test/command/3596.md b/test/command/3596.md index a064ca632..01a871e1b 100644 --- a/test/command/3596.md +++ b/test/command/3596.md @@ -50,11 +50,9 @@ ^D - foo -- <div id="id"> - +- ::: {#id} bar - - </div> + ::: - baz diff --git a/test/command/4007.md b/test/command/4007.md new file mode 100644 index 000000000..c6064e0f2 --- /dev/null +++ b/test/command/4007.md @@ -0,0 +1,23 @@ +``` +pandoc -f latex -t native +\newcommand\arrow\to +$a\arrow b$ +^D +[Para [Math InlineMath "a\\to b"]] +``` + +``` +pandoc -f latex -t native +\newcommand\pfeil[1]{\to #1} +$a\pfeil b$ +^D +[Para [Math InlineMath "a\\to b"]] +``` + +``` +pandoc -f latex -t native +\newcommand\fleche{\to} +$a\fleche b$ +^D +[Para [Math InlineMath "a\\to b"]] +``` diff --git a/test/command/4012.md b/test/command/4012.md new file mode 100644 index 000000000..579ee2459 --- /dev/null +++ b/test/command/4012.md @@ -0,0 +1,8 @@ +``` +pandoc -f markdown-implicit_figures +![image] + +[image]: http://example.com/image.jpg {height=35mm} +^D +<p><img src="http://example.com/image.jpg" alt="image" style="height:35mm" /></p> +``` diff --git a/test/command/4016.md b/test/command/4016.md new file mode 100644 index 000000000..69ad1c911 --- /dev/null +++ b/test/command/4016.md @@ -0,0 +1,47 @@ +``` +pandoc -t beamer +# Level 2 blocks + +<div class="columns"> +<div class="column" width="40%"> +## Block one +- Item +</div> +<div class="column" width="60%"> +## Block two +- Item +</div> +</div> +^D +\begin{frame}{% +\protect\hypertarget{level-2-blocks}{% +Level 2 blocks}} + +\begin{columns}[T] +\begin{column}{0.40\textwidth} +\begin{block}{Block one} + +\begin{itemize} +\tightlist +\item + Item +\end{itemize} + +\end{block} +\end{column} + +\begin{column}{0.60\textwidth} +\begin{block}{Block two} + +\begin{itemize} +\tightlist +\item + Item +\end{itemize} + +\end{block} +\end{column} +\end{columns} + +\end{frame} +``` diff --git a/test/command/4019.md b/test/command/4019.md new file mode 100644 index 000000000..ab13f0233 --- /dev/null +++ b/test/command/4019.md @@ -0,0 +1,8 @@ +``` +pandoc --wrap=preserve +This <!-- x > 0 --> works! +This <!-- x > 0 --> fails? +^D +<p>This <!-- x > 0 --> works! +This <!-- x > 0 --> fails?</p> +``` diff --git a/test/command/latex-command-comment.md b/test/command/latex-command-comment.md new file mode 100644 index 000000000..640277f15 --- /dev/null +++ b/test/command/latex-command-comment.md @@ -0,0 +1,7 @@ +``` +pandoc -f latex -t native +\emph% +{hi} +^D +[Para [Emph [Str "hi"]]] +``` diff --git a/test/creole-reader.native b/test/creole-reader.native new file mode 100644 index 000000000..a7e85d969 --- /dev/null +++ b/test/creole-reader.native @@ -0,0 +1,95 @@ +Pandoc (Meta {unMeta = fromList []}) +[Header 1 ("",[],[]) [Str "Top-level heading (1)"] +,Header 2 ("",[],[]) [Str "This a test for creole 0.1 (2)"] +,Header 3 ("",[],[]) [Str "This is a Subheading (3)"] +,Header 4 ("",[],[]) [Str "Subsub (4)"] +,Header 5 ("",[],[]) [Str "Subsubsub (5)"] +,Para [Str "The",Space,Str "ending",Space,Str "equal",Space,Str "signs",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "displayed:"] +,Header 1 ("",[],[]) [Str "Top-level heading (1)"] +,Header 2 ("",[],[]) [Str "This a test for creole 0.1 (2)"] +,Header 3 ("",[],[]) [Str "This is a Subheading (3)"] +,Header 4 ("",[],[]) [Str "Subsub (4)"] +,Header 5 ("",[],[]) [Str "Subsubsub (5)"] +,Para [Str "You",Space,Str "can",Space,Str "make",Space,Str "things",Space,Strong [Str "bold"],Space,Str "or",Space,Emph [Str "italic"],Space,Str "or",Space,Strong [Emph [Str "both"]],Space,Str "or",Space,Emph [Strong [Str "both"]],Str "."] +,Para [Str "Character",Space,Str "formatting",Space,Str "extends",Space,Str "across",Space,Str "line",Space,Str "breaks:",Space,Strong [Str "bold,",Space,Str "this",Space,Str "is",Space,Str "still",Space,Str "bold.",Space,Str "This",Space,Str "line",Space,Str "deliberately",Space,Str "does",Space,Str "not",Space,Str "end",Space,Str "in",Space,Str "star-star."]] +,Para [Str "Not",Space,Str "bold.",Space,Str "Character",Space,Str "formatting",Space,Str "does",Space,Str "not",Space,Str "cross",Space,Str "paragraph",Space,Str "boundaries."] +,Para [Str "You",Space,Str "can",Space,Str "use",Space,Link ("",[],[]) [Str "internal links"] ("internal links",""),Space,Str "or",Space,Link ("",[],[]) [Str "external links"] ("http://www.wikicreole.org",""),Str ",",Space,Str "give",Space,Str "the",Space,Str "link",Space,Str "a",Space,Link ("",[],[]) [Str "different"] ("internal links",""),Space,Str "name."] +,Para [Str "Here's",Space,Str "another",Space,Str "sentence:",Space,Str "This",Space,Str "wisdom",Space,Str "is",Space,Str "taken",Space,Str "from",Space,Link ("",[],[]) [Str "Ward Cunningham's"] ("Ward Cunningham's",""),Space,Link ("",[],[]) [Str "Presentation at the Wikisym 06"] ("http://www.c2.com/doc/wikisym/WikiSym2006.pdf",""),Str "."] +,Para [Str "Here's",Space,Str "a",Space,Str "external",Space,Str "link",Space,Str "without",Space,Str "a",Space,Str "description:",Space,Link ("",[],[]) [Str "http://www.wikicreole.org"] ("http://www.wikicreole.org","")] +,Para [Str "Be",Space,Str "careful",Space,Str "that",Space,Str "italic",Space,Str "links",Space,Str "are",Space,Str "rendered",Space,Str "properly:",Space,Emph [Link ("",[],[]) [Str "My Book Title"] ("http://my.book.example/","")]] +,Para [Str "Free",Space,Str "links",Space,Str "without",Space,Str "braces",Space,Str "should",Space,Str "be",Space,Str "rendered",Space,Str "as",Space,Str "well,",Space,Str "like",Space,Link ("",[],[]) [Str "http://www.wikicreole.org/"] ("http://www.wikicreole.org/",""),Space,Str "and",Space,Link ("",[],[]) [Str "http://www.wikicreole.org/users/~example"] ("http://www.wikicreole.org/users/~example",""),Str "."] +,Para [Str "Creole1.0",Space,Str "specifies",Space,Str "that",Space,Link ("",[],[]) [Str "http://bar"] ("http://bar",""),Space,Str "and",Space,Link ("",[],[]) [Str "ftp://bar"] ("ftp://bar",""),Space,Str "should",Space,Str "not",Space,Str "render",Space,Str "italic,",Space,Str "something",Space,Str "like",Space,Str "foo:",Emph [Str "bar",Space,Str "should",Space,Str "render",Space,Str "as",Space,Str "italic."]] +,Para [Str "You",Space,Str "can",Space,Str "use",Space,Str "this",Space,Str "to",Space,Str "draw",Space,Str "a",Space,Str "line",Space,Str "to",Space,Str "separate",Space,Str "the",Space,Str "page:"] +,HorizontalRule +,Para [Str "You",Space,Str "can",Space,Str "use",Space,Str "lists,",Space,Str "start",Space,Str "it",Space,Str "at",Space,Str "the",Space,Str "first",Space,Str "column",Space,Str "for",Space,Str "now,",Space,Str "please..."] +,Para [Str "unnumbered",Space,Str "lists",Space,Str "are",Space,Str "like"] +,BulletList + [[Plain [Str "item",Space,Str "a"]] + ,[Plain [Str "item",Space,Str "b"]] + ,[Plain [Strong [Str "bold",Space,Str "item",Space,Str "c"]]]] +,Para [Str "blank",Space,Str "space",Space,Str "is",Space,Str "also",Space,Str "permitted",Space,Str "before",Space,Str "lists",Space,Str "like:"] +,BulletList + [[Plain [Str "item",Space,Str "a"]] + ,[Plain [Str "item",Space,Str "b"]] + ,[Plain [Str "item",Space,Str "c"] + ,BulletList + [[Plain [Str "item",Space,Str "c.a"]]]]] +,Para [Str "or",Space,Str "you",Space,Str "can",Space,Str "number",Space,Str "them"] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Link ("",[],[]) [Str "item 1"] ("item 1","")]] + ,[Plain [Str "item",Space,Str "2"]] + ,[Plain [Emph [Space,Str "italic",Space,Str "item",Space,Str "3",Space]] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "item",Space,Str "3.1"]] + ,[Plain [Str "item",Space,Str "3.2"]]]]] +,Para [Str "up",Space,Str "to",Space,Str "five",Space,Str "levels"] +,BulletList + [[Plain [Str "1"] + ,BulletList + [[Plain [Str "2"] + ,BulletList + [[Plain [Str "3"] + ,BulletList + [[Plain [Str "4"] + ,BulletList + [[Plain [Str "5"]]]]]]]]]]] +,BulletList + [[Plain [Str "You",Space,Str "can",Space,Str "have",Space,Str "multiline",Space,Str "list",Space,Str "items"]] + ,[Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "second",Space,Str "multiline",Space,Str "list",Space,Str "item"]]] +,Para [Str "You",Space,Str "can",Space,Str "use",Space,Str "nowiki",Space,Str "syntax",Space,Str "if",Space,Str "you",Space,Str "would",Space,Str "like",Space,Str "do",Space,Str "stuff",Space,Str "like",Space,Str "this:"] +,CodeBlock ("",[],[]) "Guitar Chord C:\n\n||---|---|---|\n||-0-|---|---|\n||---|---|---|\n||---|-0-|---|\n||---|---|-0-|\n||---|---|---|" +,Para [Str "You",Space,Str "can",Space,Str "also",Space,Str "use",Space,Str "it",Space,Str "inline",Space,Str "nowiki",Space,Code ("",[],[]) " in a sentence ",Space,Str "like",Space,Str "this."] +,Header 1 ("",[],[]) [Str "Escapes"] +,Para [Str "Normal",Space,Str "Link:",Space,Link ("",[],[]) [Str "http://wikicreole.org/"] ("http://wikicreole.org/",""),Space,Str "-",Space,Str "now",Space,Str "same",Space,Str "link,",Space,Str "but",Space,Str "escaped:",Space,Str "http://wikicreole.org/"] +,Para [Str "Normal",Space,Str "asterisks:",Space,Str "**not",Space,Str "bold**"] +,Para [Str "a",Space,Str "tilde",Space,Str "alone:",Space,Str "~"] +,Para [Str "a",Space,Str "tilde",Space,Str "escapes",Space,Str "itself:",Space,Str "~xxx"] +,Header 3 ("",[],[]) [Str "Creole 0.2"] +,Para [Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "flower",Space,Str "with",Space,Str "the",Space,Str "ALT",Space,Str "text",Space,Str "\"this",Space,Str "is",Space,Str "a",Space,Str "flower\"",Space,Str "if",Space,Str "your",Space,Str "wiki",Space,Str "supports",Space,Str "ALT",Space,Str "text",Space,Str "on",Space,Str "images:"] +,Para [Image ("",[],[]) [Str "here is a red flower"] ("Red-Flower.jpg","")] +,Header 3 ("",[],[]) [Str "Creole 0.4"] +,Para [Str "Tables",Space,Str "are",Space,Str "done",Space,Str "like",Space,Str "this:"] +,Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[Plain [Str "header",Space,Str "col1"]] + ,[Plain [Str "header",Space,Str "col2"]]] + [[[Plain [Str "col1"]] + ,[Plain [Str "col2"]]] + ,[[Plain [Str "you"]] + ,[Plain [Str "can"]]] + ,[[Plain [Str "also"]] + ,[Plain [Str "align",LineBreak,Str "it."]]]] +,Para [Str "You",Space,Str "can",Space,Str "format",Space,Str "an",Space,Str "address",Space,Str "by",Space,Str "simply",Space,Str "forcing",Space,Str "linebreaks:"] +,Para [Str "My",Space,Str "contact",Space,Str "dates:",LineBreak,Str "Pone:",Space,Str "xyz",LineBreak,Str "Fax:",Space,Str "+45",LineBreak,Str "Mobile:",Space,Str "abc"] +,Header 3 ("",[],[]) [Str "Creole 0.5"] +,Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[Plain [Str "Header",Space,Str "title"]] + ,[Plain [Str "Another",Space,Str "header",Space,Str "title"]]] + [[[Plain [Code ("",[],[]) " //not italic text// "]] + ,[Plain [Code ("",[],[]) " **not bold text** "]]] + ,[[Plain [Emph [Str "italic",Space,Str "text"]]] + ,[Plain [Strong [Space,Str "bold",Space,Str "text",Space]]]]] +,Header 3 ("",[],[]) [Str "Creole 1.0"] +,Para [Str "If",Space,Str "interwiki",Space,Str "links",Space,Str "are",Space,Str "setup",Space,Str "in",Space,Str "your",Space,Str "wiki,",Space,Str "this",Space,Str "links",Space,Str "to",Space,Str "the",Space,Str "WikiCreole",Space,Str "page",Space,Str "about",Space,Str "Creole",Space,Str "1.0",Space,Str "test",Space,Str "cases:",Space,Link ("",[],[]) [Str "WikiCreole:Creole1.0TestCases"] ("WikiCreole:Creole1.0TestCases",""),Str "."] +,HorizontalRule +,Para [Str "The",Space,Str "above",Space,Str "test",Space,Str "document",Space,Str "was",Space,Str "found",Space,Str "on",Space,Link ("",[],[]) [Str "http://www.wikicreole.org/wiki/Creole1.0TestCases"] ("http://www.wikicreole.org/wiki/Creole1.0TestCases",""),Space,Str "and",Space,Str "downloaded",Space,Str "from",Space,Link ("",[],[]) [Str "http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt"] ("http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt",""),Str "."] +,Para [Str "The",Space,Str "Creole",Space,Str "Wiki",Space,Str "is",Space,Str "licensed:",Space,Str "Copyright",Space,Str "(C)",Space,Str "by",Space,Str "the",Space,Str "contributors.",Space,Str "Some",Space,Str "rights",Space,Str "reserved,",Space,Str "license",Space,Link ("",[],[]) [Str "https://creativecommons.org/licenses/by-sa/1.0/"] ("BY-SA",""),Str "."]] diff --git a/test/creole-reader.txt b/test/creole-reader.txt new file mode 100644 index 000000000..efed9cd1d --- /dev/null +++ b/test/creole-reader.txt @@ -0,0 +1,137 @@ += Top-level heading (1) +== This a test for creole 0.1 (2) +=== This is a Subheading (3) +==== Subsub (4) +===== Subsubsub (5) + +The ending equal signs should not be displayed: + += Top-level heading (1) = +== This a test for creole 0.1 (2) == +=== This is a Subheading (3) === +==== Subsub (4) ==== +===== Subsubsub (5) ===== + + +You can make things **bold** or //italic// or **//both//** or //**both**//. + +Character formatting extends across line breaks: **bold, +this is still bold. This line deliberately does not end in star-star. + +Not bold. Character formatting does not cross paragraph boundaries. + +You can use [[internal links]] or [[http://www.wikicreole.org|external links]], +give the link a [[internal links|different]] name. + +Here's another sentence: This wisdom is taken from [[Ward Cunningham's]] +[[http://www.c2.com/doc/wikisym/WikiSym2006.pdf|Presentation at the Wikisym 06]]. + +Here's a external link without a description: [[http://www.wikicreole.org]] + +Be careful that italic links are rendered properly: //[[http://my.book.example/|My Book Title]]// + +Free links without braces should be rendered as well, like http://www.wikicreole.org/ and http://www.wikicreole.org/users/~example. + +Creole1.0 specifies that http://bar and ftp://bar should not render italic, +something like foo://bar should render as italic. + +You can use this to draw a line to separate the page: +---- + +You can use lists, start it at the first column for now, please... + +unnumbered lists are like +* item a +* item b +* **bold item c** + +blank space is also permitted before lists like: + * item a + * item b +* item c + ** item c.a + +or you can number them +# [[item 1]] +# item 2 +# // italic item 3 // + ## item 3.1 + ## item 3.2 + +up to five levels +* 1 +** 2 +*** 3 +**** 4 +***** 5 + +* You can have +multiline list items +* this is a second multiline +list item + +You can use nowiki syntax if you would like do stuff like this: + +{{{ +Guitar Chord C: + +||---|---|---| +||-0-|---|---| +||---|---|---| +||---|-0-|---| +||---|---|-0-| +||---|---|---| +}}} + +You can also use it inline nowiki {{{ in a sentence }}} like this. + += Escapes = +Normal Link: http://wikicreole.org/ - now same link, but escaped: ~http://wikicreole.org/ + +Normal asterisks: ~**not bold~** + +a tilde alone: ~ + +a tilde escapes itself: ~~xxx + +=== Creole 0.2 === + +This should be a flower with the ALT text "this is a flower" if your wiki supports ALT text on images: + +{{Red-Flower.jpg|here is a red flower}} + +=== Creole 0.4 === + +Tables are done like this: + +|=header col1|=header col2| +|col1|col2| +|you |can | +|also |align\\ it. | + +You can format an address by simply forcing linebreaks: + +My contact dates:\\ +Pone: xyz\\ +Fax: +45\\ +Mobile: abc + +=== Creole 0.5 === + +|= Header title |= Another header title | +| {{{ //not italic text// }}} | {{{ **not bold text** }}} | +| //italic text// | ** bold text ** | + +=== Creole 1.0 === + +If interwiki links are setup in your wiki, this links to the WikiCreole page about Creole 1.0 test cases: [[WikiCreole:Creole1.0TestCases]]. + + ---- + +The above test document was found on +http://www.wikicreole.org/wiki/Creole1.0TestCases and downloaded from +http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt. + +The Creole Wiki is licensed: Copyright (C) by the contributors. Some +rights reserved, license +[[BY-SA|https://creativecommons.org/licenses/by-sa/1.0/]]. diff --git a/test/fb2/basic.fb2 b/test/fb2/basic.fb2 index ffb2bfbdf..ff1c65c11 100644 --- a/test/fb2/basic.fb2 +++ b/test/fb2/basic.fb2 @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="UTF-8"?> -<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink"><description><title-info /><document-info><program-used>pandoc</program-used></document-info></description><body><title><p /></title><annotation><p></p></annotation><section><title><p>Top-level title</p></title><section><title><p>Section</p></title><section><title><p>Subsection</p></title><p>This <emphasis>emphasized</emphasis> <strong>strong</strong> <code>verbatim</code> markdown. See this link<a l:href="#l1" type="note"><sup>[1]</sup></a>.</p><p>Ordered list:</p><p> 1. one</p><p> 2. two</p><p> 3. three</p><cite><p>Blockquote is for citatons.</p></cite><empty-line /><p><code>Code</code></p><p><code>block</code></p><p><code>is</code></p><p><code>for</code></p><p><code>code.</code></p><empty-line /><p><strikethrough>Strikeout</strikethrough> is Pandoc’s extension. Superscript and subscripts too: H<sub>2</sub>O is a liquid<a l:href="#n2" type="note"><sup>[2]</sup></a>. 2<sup>10</sup> is 1024.</p><p>Math is another Pandoc extension: <code>E = m c^2</code>.</p></section></section></section></body><body name="notes"><section id="l1"><title><p>1</p></title><p><code>http://example.com/</code></p></section><section id="n2"><title><p>2</p></title><p>Sometimes.</p></section></body></FictionBook> +<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink"><description><title-info /><document-info><program-used>pandoc</program-used></document-info></description><body><title><p /></title><annotation><p></p></annotation><section><title><p>Top-level title</p></title><section><title><p>Section</p></title><section><title><p>Subsection</p></title><p>This <emphasis>emphasized</emphasis> <strong>strong</strong> <code>verbatim</code> markdown. See this link<a l:href="#l1" type="note"><sup>[1]</sup></a>.</p><p>Ordered list:</p><p>1. one</p><p>2. two</p><p>3. three</p><cite><p>Blockquote is for citatons.</p></cite><empty-line /><p><code>Code</code></p><p><code>block</code></p><p><code>is</code></p><p><code>for</code></p><p><code>code.</code></p><empty-line /><p><strikethrough>Strikeout</strikethrough> is Pandoc’s extension. Superscript and subscripts too: H<sub>2</sub>O is a liquid<a l:href="#n2" type="note"><sup>[2]</sup></a>. 2<sup>10</sup> is 1024.</p><p>Math is another Pandoc extension: <code>E = m c^2</code>.</p></section></section></section></body><body name="notes"><section id="l1"><title><p>1</p></title><p><code>http://example.com/</code></p></section><section id="n2"><title><p>2</p></title><p>Sometimes.</p></section></body></FictionBook> diff --git a/test/writer.fb2 b/test/writer.fb2 index 63d0bdfbf..d25ce1f62 100644 --- a/test/writer.fb2 +++ b/test/writer.fb2 @@ -115,8 +115,8 @@ </p> <empty-line /> <p>A list:</p> -<p> 1. item one</p> -<p> 2. item two</p> +<p>1. item one</p> +<p>2. item two</p> <p>Nested block quotes:</p> <cite> <p>nested</p> @@ -191,127 +191,131 @@ <p>• asterisk 2</p> <p>• asterisk 3</p> <p>Asterisks loose:</p> -<p>• asterisk 1<empty-line /> -</p> -<p>• asterisk 2<empty-line /> -</p> -<p>• asterisk 3<empty-line /> -</p> +<p>• asterisk 1</p> +<empty-line /> +<p>• asterisk 2</p> +<empty-line /> +<p>• asterisk 3</p> +<empty-line /> <p>Pluses tight:</p> <p>• Plus 1</p> <p>• Plus 2</p> <p>• Plus 3</p> <p>Pluses loose:</p> -<p>• Plus 1<empty-line /> -</p> -<p>• Plus 2<empty-line /> -</p> -<p>• Plus 3<empty-line /> -</p> +<p>• Plus 1</p> +<empty-line /> +<p>• Plus 2</p> +<empty-line /> +<p>• Plus 3</p> +<empty-line /> <p>Minuses tight:</p> <p>• Minus 1</p> <p>• Minus 2</p> <p>• Minus 3</p> <p>Minuses loose:</p> -<p>• Minus 1<empty-line /> -</p> -<p>• Minus 2<empty-line /> -</p> -<p>• Minus 3<empty-line /> -</p> +<p>• Minus 1</p> +<empty-line /> +<p>• Minus 2</p> +<empty-line /> +<p>• Minus 3</p> +<empty-line /> </section> <section> <title> <p>Ordered</p> </title> <p>Tight:</p> -<p> 1. First</p> -<p> 2. Second</p> -<p> 3. Third</p> +<p>1. First</p> +<p>2. Second</p> +<p>3. Third</p> <p>and:</p> -<p> 1. One</p> -<p> 2. Two</p> -<p> 3. Three</p> +<p>1. One</p> +<p>2. Two</p> +<p>3. Three</p> <p>Loose using tabs:</p> -<p> 1. First<empty-line /> -</p> -<p> 2. Second<empty-line /> -</p> -<p> 3. Third<empty-line /> -</p> +<p>1. First</p> +<empty-line /> +<p>2. Second</p> +<empty-line /> +<p>3. Third</p> +<empty-line /> <p>and using spaces:</p> -<p> 1. One<empty-line /> -</p> -<p> 2. Two<empty-line /> -</p> -<p> 3. Three<empty-line /> -</p> +<p>1. One</p> +<empty-line /> +<p>2. Two</p> +<empty-line /> +<p>3. Three</p> +<empty-line /> <p>Multiple paragraphs:</p> -<p> 1. Item 1, graf one.<empty-line />Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.<empty-line /> -</p> -<p> 2. Item 2.<empty-line /> -</p> -<p> 3. Item 3.<empty-line /> -</p> +<p>1. Item 1, graf one.</p> +<empty-line /> +<p> Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.</p> +<empty-line /> +<p>2. Item 2.</p> +<empty-line /> +<p>3. Item 3.</p> +<empty-line /> </section> <section> <title> <p>Nested</p> </title> -<p>• Tab<p>◦ Tab<p>* Tab</p> -</p> -</p> +<p>• Tab</p> +<p>◦ Tab</p> +<p>* Tab</p> <p>Here’s another:</p> -<p> 1. First</p> -<p> 2. Second:<p> • Fee</p> +<p>1. First</p> +<p>2. Second:</p> +<p> • Fee</p> <p> • Fie</p> <p> • Foe</p> -</p> -<p> 3. Third</p> +<p>3. Third</p> <p>Same thing but with paragraphs:</p> -<p> 1. First<empty-line /> -</p> -<p> 2. Second:<empty-line /> +<p>1. First</p> +<empty-line /> +<p>2. Second:</p> +<empty-line /> <p> • Fee</p> <p> • Fie</p> <p> • Foe</p> -</p> -<p> 3. Third<empty-line /> -</p> +<p>3. Third</p> +<empty-line /> </section> <section> <title> <p>Tabs and spaces</p> </title> -<p>• this is a list item indented with tabs<empty-line /> -</p> -<p>• this is a list item indented with spaces<empty-line /> -<p>◦ this is an example list item indented with tabs<empty-line /> -</p> -<p>◦ this is an example list item indented with spaces<empty-line /> -</p> -</p> +<p>• this is a list item indented with tabs</p> +<empty-line /> +<p>• this is a list item indented with spaces</p> +<empty-line /> +<p>◦ this is an example list item indented with tabs</p> +<empty-line /> +<p>◦ this is an example list item indented with spaces</p> +<empty-line /> </section> <section> <title> <p>Fancy list markers</p> </title> -<p> (2) begins with 2</p> -<p> (3) and now 3<empty-line />with a continuation<empty-line /> -<p> (3) iv. sublist with roman numerals, starting with 4</p> -<p> (3) v. more items<p> (3) v. (A) a subsublist</p> -<p> (3) v. (B) a subsublist</p> -</p> -</p> +<p>(2) begins with 2</p> +<p>(3) and now 3</p> +<empty-line /> +<p> with a continuation</p> +<empty-line /> +<p>(3) iv. sublist with roman numerals, starting with 4</p> +<p>(3) v. more items</p> +<p>(3) v. (A) a subsublist</p> +<p>(3) v. (B) a subsublist</p> <p>Nesting:</p> -<p> A. Upper Alpha<p> A. I. Upper Roman.<p> A. I. (6) Decimal start with 6<p> A. I. (6) c) Lower alpha with paren</p> -</p> -</p> -</p> +<p>A. Upper Alpha</p> +<p>A. I. Upper Roman.</p> +<p>A. I. (6) Decimal start with 6</p> +<p>A. I. (6) c) Lower alpha with paren</p> <p>Autonumbering:</p> -<p> 1. Autonumber.</p> -<p> 2. More.<p> 2. 1. Nested.</p> -</p> +<p>1. Autonumber.</p> +<p>2. More.</p> +<p>2. 1. Nested.</p> <p>Should not be a list item:</p> <p>M.A. 2007</p> <p>B. Williams</p> @@ -328,64 +332,61 @@ <p> <strong>apple</strong> </p> -<p> red fruit<empty-line /> -</p> +<p> red fruit</p> <p> <strong>orange</strong> </p> -<p> orange fruit<empty-line /> -</p> +<p> orange fruit</p> <p> <strong>banana</strong> </p> -<p> yellow fruit<empty-line /> -</p> +<p> yellow fruit</p> <p>Tight using tabs:</p> <p> <strong>apple</strong> </p> -<p> red fruit<empty-line /> -</p> +<p> red fruit</p> <p> <strong>orange</strong> </p> -<p> orange fruit<empty-line /> -</p> +<p> orange fruit</p> <p> <strong>banana</strong> </p> -<p> yellow fruit<empty-line /> -</p> +<p> yellow fruit</p> <p>Loose:</p> <p> <strong>apple</strong> </p> -<p> red fruit<empty-line /> -</p> +<p> red fruit</p> +<empty-line /> <p> <strong>orange</strong> </p> -<p> orange fruit<empty-line /> -</p> +<p> orange fruit</p> +<empty-line /> <p> <strong>banana</strong> </p> -<p> yellow fruit<empty-line /> -</p> +<p> yellow fruit</p> +<empty-line /> <p>Multiple blocks with italics:</p> <p> <strong> <emphasis>apple</emphasis> </strong> </p> -<p> red fruit<empty-line /> contains seeds, crisp, pleasant to taste<empty-line /> -</p> +<p> red fruit</p> +<empty-line /> +<p> contains seeds, crisp, pleasant to taste</p> +<empty-line /> <p> <strong> <emphasis>orange</emphasis> </strong> </p> -<p> orange fruit<empty-line /> +<p> orange fruit</p> +<empty-line /> <empty-line /> <p> <code> { orange code block }</code> @@ -394,42 +395,47 @@ <cite> <p> orange block quote</p> </cite> -</p> <p>Multiple definitions, tight:</p> <p> <strong>apple</strong> </p> -<p> red fruit<empty-line /> computer<empty-line /> -</p> +<p> red fruit</p> +<p> computer</p> <p> <strong>orange</strong> </p> -<p> orange fruit<empty-line /> bank<empty-line /> -</p> +<p> orange fruit</p> +<p> bank</p> <p>Multiple definitions, loose:</p> <p> <strong>apple</strong> </p> -<p> red fruit<empty-line /> computer<empty-line /> -</p> +<p> red fruit</p> +<empty-line /> +<p> computer</p> +<empty-line /> <p> <strong>orange</strong> </p> -<p> orange fruit<empty-line /> bank<empty-line /> -</p> +<p> orange fruit</p> +<empty-line /> +<p> bank</p> +<empty-line /> <p>Blank line after term, indented marker, alternate markers:</p> <p> <strong>apple</strong> </p> -<p> red fruit<empty-line /> computer<empty-line /> -</p> +<p> red fruit</p> +<empty-line /> +<p> computer</p> +<empty-line /> <p> <strong>orange</strong> </p> -<p> orange fruit<empty-line /> -<p> 1. sublist</p> -<p> 2. sublist</p> -</p> +<p> orange fruit</p> +<empty-line /> +<p>1. sublist</p> +<p>2. sublist</p> </section> <section> <title> @@ -753,7 +759,7 @@ </a> </p> </cite> -<p> 1. And in list items.<a l:href="#n32" type="note"> +<p>1. And in list items.<a l:href="#n32" type="note"> <sup>[32]</sup> </a> </p> diff --git a/test/writer.jats b/test/writer.jats index 6f808e109..0f52965bc 100644 --- a/test/writer.jats +++ b/test/writer.jats @@ -14,6 +14,18 @@ <title-group> <article-title>Pandoc Test Suite</article-title> </title-group> +<contrib-group> +<contrib contrib-type="author"> +<name> +<string-name>John MacFarlane</string-name> +</name> +</contrib> +<contrib contrib-type="author"> +<name> +<string-name>Anonymous</string-name> +</name> +</contrib> +</contrib-group> <pub-date pub-type="epub"> <string-date>July 17, 2006</string-date> </pub-date> |