diff options
Diffstat (limited to 'test/djot-reader.native')
| -rw-r--r-- | test/djot-reader.native | 986 |
1 files changed, 986 insertions, 0 deletions
diff --git a/test/djot-reader.native b/test/djot-reader.native new file mode 100644 index 000000000..528c34e04 --- /dev/null +++ b/test/djot-reader.native @@ -0,0 +1,986 @@ +Pandoc + Meta { unMeta = fromList [] } + [ Div + ( "Pandoc-Test-Suite" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header 1 ( "" , [] , [] ) [ Str "Pandoc Test Suite" ] + , Para + [ Str "John MacFarlane" , SoftBreak , Str "Anonymous" ] + , Para [ Str "July 17, 2006" ] + , Para + [ Str + "This is a set of tests for pandoc. Most of them are adapted from John Gruber\8217s" + , SoftBreak + , Str "markdown test suite." + ] + , HorizontalRule + ] + , Div + ( "headers" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "Headers" ] + , Div + ( "level-2-with-an-embedded-link" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header + 2 + ( "" , [] , [] ) + [ Str "Level 2 with an " + , Link + ( "" , [] , [] ) + [ Str "embedded link" ] + ( "/url" , "" ) + ] + , Div + ( "level-3-with-emphasis" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header + 3 + ( "" , [] , [] ) + [ Str "Level 3 with " , Emph [ Str "emphasis" ] ] + , Div + ( "level-4" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header 4 ( "" , [] , [] ) [ Str "Level 4" ] + , Div + ( "level-5" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header 5 ( "" , [] , [] ) [ Str "Level 5" ] ] + ] + ] + ] + ] + , Div + ( "level-1" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "Level 1" ] + , Div + ( "level-2-with-emphasis" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header + 2 + ( "" , [] , [] ) + [ Str "Level 2 with " , Emph [ Str "emphasis" ] ] + , Div + ( "level-3" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 3 ( "" , [] , [] ) [ Str "Level 3" ] + , Para [ Str "with no blank line" ] + ] + ] + , Div + ( "level-2" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 2 ( "" , [] , [] ) [ Str "Level 2" ] + , Para [ Str "with no blank line" ] + , HorizontalRule + ] + ] + , Div + ( "paragraphs" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "Paragraphs" ] + , Para [ Str "Here\8217s a regular paragraph." ] + , Para + [ Str + "In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item." + , SoftBreak + , Str + "Because a hard-wrapped line in the middle of a paragraph looked like a list" + , SoftBreak + , Str "item." + ] + , Para [ Str "Here\8217s one with a bullet. * criminey." ] + , Para + [ Str "There should be a hard line break" + , LineBreak + , Str "here." + ] + , HorizontalRule + ] + , Div + ( "block-quotes" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "Block Quotes" ] + , Para [ Str "E-mail style:" ] + , BlockQuote + [ Para [ Str "This is a block quote. It is pretty short." ] + ] + , BlockQuote + [ Para [ Str "Code in a block quote:" ] + , CodeBlock + ( "" , [ "" ] , [] ) + "sub status {\nprint \"working\";\n}\n" + , Para [ Str "A list:" ] + , OrderedList + ( 1 , Decimal , Period ) + [ [ Plain [ Str "item one" ] ] + , [ Plain [ Str "item two" ] ] + ] + , BlockQuote [ Para [ Str "nested" ] ] + , BlockQuote [ Para [ Str "nested" ] ] + ] + , Para [ Str "This should not be a block quote: 2 > 1." ] + , Para [ Str "And a following paragraph." ] + , HorizontalRule + ] + , Div + ( "code-blocks" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "Code Blocks" ] + , Para [ Str "Code:" ] + , CodeBlock + ( "" , [ "" ] , [] ) + "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab\n" + , Para [ Str "And:" ] + , CodeBlock + ( "" , [ "" ] , [] ) + " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{\n" + , HorizontalRule + ] + , Div + ( "lists" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "Lists" ] + , Div + ( "unordered" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 2 ( "" , [] , [] ) [ Str "Unordered" ] + , Para [ Str "Asterisks tight:" ] + , BulletList + [ [ Para [ Str "asterisk 1" ] ] + , [ Para [ Str "asterisk 2" ] ] + , [ Para [ Str "asterisk 3" ] ] + , [ Para [ Str "asterisk 1" ] ] + , [ Para [ Str "asterisk 2" ] ] + , [ Para [ Str "asterisk 3" ] ] + , [ Para [ Str "Plus 1" ] ] + , [ Para [ Str "Plus 2" ] ] + , [ Para [ Str "Plus 3" ] ] + , [ Para [ Str "Plus 1" ] ] + , [ Para [ Str "Plus 2" ] ] + , [ Para [ Str "Plus 3" ] ] + , [ Para [ Str "Minus 1" ] ] + , [ Para [ Str "Minus 2" ] ] + , [ Para [ Str "Minus 3" ] ] + , [ Para [ Str "Minus 1" ] ] + , [ Para [ Str "Minus 2" ] ] + , [ Para [ Str "Minus 3" ] ] + ] + ] + , Div + ( "ordered" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 2 ( "" , [] , [] ) [ Str "Ordered" ] + , Para [ Str "Tight:" ] + , OrderedList + ( 1 , Decimal , Period ) + [ [ Para [ Str "First" ] ] + , [ Para [ Str "Second" ] ] + , [ Para [ Str "Third" ] ] + , [ Para [ Str "One" ] ] + , [ Para [ Str "Two" ] ] + , [ Para [ Str "Three" ] ] + , [ Para [ Str "First" ] ] + , [ Para [ Str "Second" ] ] + , [ Para [ Str "Third" ] ] + , [ Para [ Str "One" ] ] + , [ Para [ Str "Two" ] ] + , [ Para [ Str "Three" ] ] + , [ Para [ Str "Item 1, graf one." ] + , Para + [ Str + "Item 1. graf two. The quick brown fox jumped over the lazy dog\8217s back." + ] + ] + , [ Para [ Str "Item 2." ] ] + , [ Para [ Str "Item 3." ] ] + ] + ] + , Div + ( "nested" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 2 ( "" , [] , [] ) [ Str "Nested" ] + , BulletList + [ [ Plain [ Str "Tab" ] + , BulletList + [ [ Plain [ Str "Tab" ] + , BulletList [ [ Plain [ Str "Tab" ] ] ] + ] + ] + ] + ] + , OrderedList + ( 1 , Decimal , Period ) + [ [ Para [ Str "First" ] ] + , [ Para [ Str "Second:" ] + , BulletList + [ [ Plain [ Str "Fee" ] ] + , [ Plain [ Str "Fie" ] ] + , [ Plain [ Str "Foe" ] ] + ] + ] + , [ Para [ Str "Third" ] ] + , [ Para [ Str "First" ] ] + , [ Para [ Str "Second:" ] + , BulletList + [ [ Plain [ Str "Fee" ] ] + , [ Plain [ Str "Fie" ] ] + , [ Plain [ Str "Foe" ] ] + ] + ] + , [ Para [ Str "Third" ] ] + ] + ] + , Div + ( "tabs-and-spaces" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header 2 ( "" , [] , [] ) [ Str "Tabs and spaces" ] + , BulletList + [ [ Para [ Str "this is a list item indented with tabs" ] + ] + , [ Para + [ Str "this is a list item indented with spaces" ] + , BulletList + [ [ Para + [ Str + "this is an example list item indented with tabs" + ] + ] + , [ Para + [ Str + "this is an example list item indented with spaces" + ] + ] + ] + ] + ] + ] + , Div + ( "fancy-list-markers" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header 2 ( "" , [] , [] ) [ Str "Fancy list markers" ] + , OrderedList + ( 2 , Decimal , TwoParens ) + [ [ Para [ Str "begins with 2" ] ] + , [ Para [ Str "and now 3" ] + , Para [ Str "with a continuation" ] + , OrderedList + ( 4 , LowerRoman , Period ) + [ [ Plain + [ Str + "sublist with roman numerals, starting with 4" + ] + ] + , [ Plain [ Str "more items" ] + , OrderedList + ( 1 , UpperAlpha , TwoParens ) + [ [ Plain [ Str "a subsublist" ] ] + , [ Plain [ Str "a subsublist" ] ] + ] + ] + ] + ] + ] + , OrderedList + ( 1 , UpperAlpha , Period ) + [ [ Plain [ Str "Upper Alpha" ] + , OrderedList + ( 1 , UpperRoman , Period ) + [ [ Plain [ Str "Upper Roman." ] + , OrderedList + ( 6 , Decimal , TwoParens ) + [ [ Plain [ Str "Decimal start with 6" ] + , OrderedList + ( 3 , LowerAlpha , OneParen ) + [ [ Plain + [ Str "Lower alpha with paren" ] + ] + ] + ] + ] + ] + ] + ] + ] + , OrderedList + ( 1 , Decimal , Period ) + [ [ Plain [ Str "Autonumber." ] ] + , [ Plain [ Str "More." ] + , OrderedList + ( 1 , Decimal , Period ) + [ [ Plain [ Str "Nested." ] ] ] + ] + ] + , OrderedList + ( 2 , UpperAlpha , Period ) + [ [ Plain [ Str "Williams" ] ] ] + , HorizontalRule + ] + ] + , Div + ( "definition-lists" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header 1 ( "" , [] , [] ) [ Str "Definition Lists" ] + , Para [ Str "Tight using spaces:" ] + , DefinitionList + [ ( [ Str "apple" ] , [ [ Para [ Str "red fruit" ] ] ] ) + , ( [ Str "orange" ] , [ [ Para [ Str "orange fruit" ] ] ] ) + , ( [ Str "banana" ] , [ [ Para [ Str "yellow fruit" ] ] ] ) + , ( [ Str "apple" ] , [ [ Para [ Str "red fruit" ] ] ] ) + , ( [ Str "orange" ] , [ [ Para [ Str "orange fruit" ] ] ] ) + , ( [ Str "banana" ] , [ [ Para [ Str "yellow fruit" ] ] ] ) + , ( [ Str "apple" ] , [ [ Para [ Str "red fruit" ] ] ] ) + , ( [ Str "orange" ] , [ [ Para [ Str "orange fruit" ] ] ] ) + , ( [ Str "banana" ] , [ [ Para [ Str "yellow fruit" ] ] ] ) + , ( [ Emph [ Str "apple" ] ] + , [ [ Para [ Str "red fruit" ] + , Para + [ Str "contains seeds, crisp, pleasant to taste" ] + ] + ] + ) + , ( [ Emph [ Str "orange" ] ] + , [ [ Para [ Str "orange fruit" ] + , CodeBlock + ( "" , [ "" ] , [] ) "{ orange code block }\n" + ] + ] + ) + ] + , BlockQuote [ Para [ Str "orange block quote" ] ] + , Para [ Str "Multiple definitions, tight:" ] + , DefinitionList + [ ( [ Str "apple" ] + , [ [ Para [ Str "red fruit" ] , Para [ Str "computer" ] ] ] + ) + , ( [ Str "orange" ] + , [ [ Para [ Str "orange fruit" ] , Para [ Str "bank" ] ] ] + ) + , ( [ Str "apple" ] + , [ [ Para [ Str "red fruit" ] , Para [ Str "computer" ] ] ] + ) + , ( [ Str "orange" ] + , [ [ Para [ Str "orange fruit" ] , Para [ Str "bank" ] ] ] + ) + , ( [ Str "apple" ] + , [ [ Para [ Str "red fruit" ] , Para [ Str "computer" ] ] ] + ) + , ( [ Str "orange" ] + , [ [ Para [ Str "orange fruit" ] + , OrderedList + ( 1 , Decimal , Period ) + [ [ Plain [ Str "sublist" ] ] + , [ Plain [ Str "sublist" ] ] + ] + ] + ] + ) + ] + ] + , Div + ( "html-blocks" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "HTML Blocks" ] + , Para [ Str "Simple block on one line:" ] + , Div ( "" , [] , [] ) [ Para [ Str "foo" ] ] + , Para [ Str "And nested without indentation:" ] + , Div + ( "" , [] , [] ) + [ Div + ( "" , [] , [] ) + [ Div ( "" , [] , [] ) [ Para [ Str "foo" ] ] ] + , Div ( "" , [] , [] ) [ Para [ Str "bar" ] ] + ] + , Para [ Str "Interpreted markdown in a table:" ] + , Para [ Str "This is " , Emph [ Str "emphasized" ] ] + , Para [ Str "And this is " , Strong [ Str "strong" ] ] + , Para [ Str "Here\8217s a simple block:" ] + , Div ( "" , [] , [] ) [ Para [ Str "foo" ] ] + , Para [ Str "This should be a code block, though:" ] + , CodeBlock ( "" , [ "" ] , [] ) "<div>\n foo\n</div>\n" + , Para [ Str "As should this:" ] + , CodeBlock ( "" , [ "" ] , [] ) "<div>foo</div>\n" + , Para [ Str "Now, nested:" ] + , Div + ( "" , [] , [] ) + [ Div + ( "" , [] , [] ) + [ Div ( "" , [] , [] ) [ Para [ Str "foo" ] ] ] + ] + , Para [ Str "This should just be an HTML comment:" ] + , Para [ Str "Multiline:" ] + , Para [ Str "Code block:" ] + , CodeBlock ( "" , [ "" ] , [] ) "<!-- Comment -->\n" + , Para + [ Str + "Just plain comment, with trailing spaces on the line:" + ] + , Para [ Str "Code:" ] + , CodeBlock ( "" , [ "" ] , [] ) "<hr />\n" + , Para [ Str "Hr\8217s:" ] + , HorizontalRule + ] + , Div + ( "inline-markup" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header 1 ( "" , [] , [] ) [ Str "Inline Markup" ] + , Para + [ Str "This is " + , Emph [ Str "emphasized" ] + , Str ", and so " + , Emph [ Str "is this" ] + , Str "." + ] + , Para + [ Str "This is " + , Strong [ Str "strong" ] + , Str ", and so " + , Strong [ Str "is this" ] + , Str "." + ] + , Para + [ Str "An " + , Emph + [ Link + ( "" , [] , [] ) + [ Str "emphasized link" ] + ( "/url" , "" ) + ] + , Str "." + ] + , Para [ Strong [ Emph [ Str "This is strong and em." ] ] ] + , Para + [ Str "So is " + , Strong [ Emph [ Str "this" ] ] + , Str " word." + ] + , Para [ Strong [ Emph [ Str "This is strong and em." ] ] ] + , Para + [ Str "So is " + , Strong [ Emph [ Str "this" ] ] + , Str " word." + ] + , Para + [ Str "This is code: " + , Code ( "" , [] , [] ) ">" + , Str ", " + , Code ( "" , [] , [] ) "$" + , Str ", " + , Code ( "" , [] , [] ) "\\`, " + , Str "$" + , Code ( "" , [] , [] ) ", " + , Str "<html>" + , Code ( "" , [] , [] ) "." + ] + , Para + [ Span + ( "" , [ "deleted" ] , [] ) + [ Str "This is " , Emph [ Str "strikeout" ] , Str "." ] + ] + , Para + [ Str "Superscripts: a" + , Superscript [ Str "bc" ] + , Str "d a" + , Superscript [ Emph [ Str "hello" ] ] + , Str " a" + , Superscript [ Str "hello\160there" ] + , Str "." + ] + , Para + [ Str "Subscripts: H" + , Subscript [ Str "2" ] + , Str "O, H" + , Subscript [ Str "23" ] + , Str "O, H" + , Subscript [ Str "many\160of\160them" ] + , Str "O." + ] + , Para + [ Str + "These should not be superscripts or subscripts, because of the unescaped spaces:" + , SoftBreak + , Str "a^b c^d, a~b c~d." + ] + , HorizontalRule + ] + , Div + ( "smart-quotes-ellipses-dashes" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header + 1 ( "" , [] , [] ) [ Str "Smart quotes, ellipses, dashes" ] + , Para + [ Quoted DoubleQuote [ Str "Hello," ] + , Str " said the spider. " + , Quoted + DoubleQuote + [ Quoted SingleQuote [ Str "Shelob" ] + , Str " is my name." + ] + ] + , Para + [ Quoted SingleQuote [ Str "A" ] + , Str ", " + , Quoted SingleQuote [ Str "B" ] + , Str ", and " + , Quoted SingleQuote [ Str "C" ] + , Str " are letters." + ] + , Para + [ Quoted SingleQuote [ Str "Oak," ] + , Str " " + , Quoted SingleQuote [ Str "elm," ] + , Str " and " + , Quoted SingleQuote [ Str "beech" ] + , Str " are names of trees. So is " + , Quoted SingleQuote [ Str "pine." ] + ] + , Para + [ Quoted + SingleQuote + [ Str "He said, " + , Quoted DoubleQuote [ Str "I want to go." ] + ] + , Str " Were you alive in the 70\8217s?" + ] + , Para + [ Str "Here is some quoted " + , Quoted SingleQuote [ Code ( "" , [] , [] ) "code" ] + , Str " and a " + , Quoted + DoubleQuote + [ Link + ( "" , [] , [] ) + [ Str "quoted" , SoftBreak , Str "link" ] + ( "http://example.com/?foo=1&bar=2" , "" ) + ] + , Str "." + ] + , Para + [ Str + "Some dashes: one\8212two \8212 three\8212four \8212 five." + ] + , Para + [ Str + "Dashes between numbers: 5\8211\&7, 255\8211\&66, 1987\8211\&1999." + ] + , Para [ Str "Ellipses\8230and\8230and\8230." ] + , HorizontalRule + ] + , Div + ( "latex" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "LaTeX" ] + , BulletList + [ [] + , [ Para [ Math InlineMath "2+2=4" ] ] + , [ Para [ Math InlineMath "x \\in y" ] ] + , [ Para [ Math InlineMath "\\alpha \\wedge \\omega" ] ] + , [ Para [ Math InlineMath "223" ] ] + , [ Para [ Math InlineMath "p" , Str "-Tree" ] ] + , [ Para + [ Str "Here\8217s some display math:" + , SoftBreak + , Math + DisplayMath + "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}" + ] + ] + , [ Para + [ Str "Here\8217s one that has a line break in it: " + , Math InlineMath "\\alpha + \\omega \\times x^2" + , Str "." + ] + ] + , [ Para + [ Str "To get the famous equation, write " + , Code ( "" , [] , [] ) "$e = mc^2$" + , Str "." + ] + ] + , [ Para + [ Str "$22,000 is a " + , Emph [ Str "lot" ] + , Str " of money. So is $34,000. (It worked if " + , Quoted DoubleQuote [ Str "lot" ] + , Str " is" + , SoftBreak + , Str "emphasized.)" + ] + ] + , [ Para [ Str "Shoes ($20) and socks ($5)." ] ] + , [ Para + [ Str "Escaped " + , Code ( "" , [] , [] ) "$" + , Str ": $73 " + , Emph [ Str "this should be emphasized" ] + , Str " 23$." + ] + ] + ] + , HorizontalRule + ] + , Div + ( "special-characters" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header 1 ( "" , [] , [] ) [ Str "Special Characters" ] + , Para [ Str "Here is some unicode:" ] + , BulletList + [ [ Plain [ Str "I hat: \206" ] ] + , [ Plain [ Str "o umlaut: \246" ] ] + , [ Plain [ Str "section: \167" ] ] + , [ Plain [ Str "set membership: \8712" ] ] + , [ Plain [ Str "copyright: \169" ] ] + ] + , HorizontalRule + ] + , Div + ( "links" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "Links" ] + , Div + ( "explicit" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 2 ( "" , [] , [] ) [ Str "Explicit" ] + , Para + [ Str "Just a " + , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" ) + , Str "." + ] + , Para + [ Link + ( "" + , [] + , [ ( "wrapper" , "1" ) , ( "title" , "title" ) ] + ) + [ Str "URL and title" ] + ( "/url/" , "" ) + , Str "." + ] + , Para + [ Link + ( "" + , [] + , [ ( "wrapper" , "1" ) + , ( "title" , "title preceded by two spaces" ) + ] + ) + [ Str "URL and title" ] + ( "/url/" , "" ) + , Str "." + ] + , Para + [ Link + ( "" + , [] + , [ ( "wrapper" , "1" ) + , ( "title" , "title preceded by a tab" ) + ] + ) + [ Str "URL and title" ] + ( "/url/" , "" ) + , Str "." + ] + , Para + [ Link + ( "" + , [] + , [ ( "wrapper" , "1" ) + , ( "title" , "title with \"quotes\" in it" ) + ] + ) + [ Str "URL and title" ] + ( "/url/" , "" ) + ] + , Para + [ Link + ( "" + , [] + , [ ( "wrapper" , "1" ) + , ( "title" , "title with single quotes" ) + ] + ) + [ Str "URL and title" ] + ( "/url/" , "" ) + ] + , Para + [ Link + ( "" , [] , [] ) + [ Str "with_underscore" ] + ( "/url/with_underscore" , "" ) + ] + , Para + [ Link + ( "" , [] , [] ) + [ Str "Email link" ] + ( "mailto:[email protected]" , "" ) + ] + , Para + [ Link ( "" , [] , [] ) [ Str "Empty" ] ( "" , "" ) + , Str "." + ] + ] + , Div + ( "reference" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 2 ( "" , [] , [] ) [ Str "Reference" ] + , Para + [ Str "Foo " + , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" ) + , Str "." + ] + , Para + [ Str "With " + , Link + ( "" , [] , [] ) + [ Str "embedded [brackets]" ] + ( "/url/" , "" ) + , Str "." + ] + , Para + [ Link ( "" , [] , [] ) [ Str "b" ] ( "/url/" , "" ) + , Str " by itself should be a link." + ] + , Para + [ Str "Indented " + , Link ( "" , [] , [] ) [ Str "once" ] ( "/url" , "" ) + , Str "." + ] + , Para + [ Str "Indented " + , Link ( "" , [] , [] ) [ Str "twice" ] ( "/url" , "" ) + , Str "." + ] + , Para + [ Str "Indented " + , Link ( "" , [] , [] ) [ Str "thrice" ] ( "/url" , "" ) + , Str "." + ] + , Para [ Str "This should [not][] be a link." ] + , CodeBlock ( "" , [ "" ] , [] ) "[not]: /url\n" + , Para + [ Str "Foo " + , Link + ( "" + , [] + , [ ( "wrapper" , "1" ) + , ( "title" , "Title with \"quotes\" inside" ) + ] + ) + [ Str "bar" ] + ( "/url/" , "" ) + , Str "." + ] + , Para + [ Str "Foo " + , Link + ( "" + , [] + , [ ( "wrapper" , "1" ) + , ( "title" , "Title with \"quote\" inside" ) + ] + ) + [ Str "biz" ] + ( "/url/" , "" ) + , Str "." + ] + ] + , Div + ( "with-ampersands" + , [ "section" ] + , [ ( "wrapper" , "1" ) ] + ) + [ Header 2 ( "" , [] , [] ) [ Str "With ampersands" ] + , Para + [ Str "Here\8217s a " + , Link + ( "" , [] , [] ) + [ Str "link with an ampersand in the URL" ] + ( "http://example.com/?foo=1&bar=2" , "" ) + , Str "." + ] + , Para + [ Str + "Here\8217s a link with an amersand in the link text:" + , SoftBreak + , Link + ( "" + , [] + , [ ( "wrapper" , "1" ) , ( "title" , "AT&T" ) ] + ) + [ Str "AT&T" ] + ( "http://att.com/" , "" ) + , Str "." + ] + , Para + [ Str "Here\8217s an " + , Link + ( "" , [] , [] ) + [ Str "inline link" ] + ( "/script?foo=1&bar=2" , "" ) + , Str "." + ] + , Para + [ Str "Here\8217s an " + , Link + ( "" , [] , [] ) + [ Str "inline link in pointy braces" ] + ( "/script?foo=1&bar=2" , "" ) + , Str "." + ] + ] + , Div + ( "autolinks" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 2 ( "" , [] , [] ) [ Str "Autolinks" ] + , Para + [ Str "With an ampersand: " + , Link + ( "" , [ "uri" ] , [] ) + [ Str "http://example.com/?foo=1&bar=2" ] + ( "http://example.com/?foo=1&bar=2" , "" ) + ] + , BulletList + [ [ Plain [ Str "In a list?" ] ] + , [ Plain + [ Link + ( "" , [ "uri" ] , [] ) + [ Str "http://example.com/" ] + ( "http://example.com/" , "" ) + ] + ] + , [ Plain [ Str "It should." ] ] + ] + , BlockQuote + [ Para + [ Str "Blockquoted: " + , Link + ( "" , [ "uri" ] , [] ) + [ Str "http://example.com/" ] + ( "http://example.com/" , "" ) + ] + ] + , Para + [ Str "Auto-links should not occur here: " + , Code ( "" , [] , [] ) "<http://example.com/>" + ] + , CodeBlock + ( "" , [ "" ] , [] ) "or here: <http://example.com/>\n" + , HorizontalRule + ] + ] + , Div + ( "images" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "Images" ] + , Para + [ Str "From " + , Quoted DoubleQuote [ Str "Voyage dans la Lune" ] + , Str " by Georges Melies (1902):" + ] + , Div + ( "" , [] , [] ) + [ Para + [ Image + ( "" + , [] + , [ ( "wrapper" , "1" ) + , ( "title" , "Voyage dans la Lune" ) + ] + ) + [ Str "lalune" ] + ( "lalune.jpg" , "" ) + ] + , Div + ( "" , [ "caption" ] , [ ( "wrapper" , "1" ) ] ) + [ Para [ Str "lalune" ] ] + ] + , Para + [ Str "Here is a movie " + , Image + ( "" , [] , [] ) [ Str "movie" ] ( "movie.jpg" , "" ) + , Str " icon." + ] + , HorizontalRule + ] + , Div + ( "footnotes" , [ "section" ] , [ ( "wrapper" , "1" ) ] ) + [ Header 1 ( "" , [] , [] ) [ Str "Footnotes" ] + , Para + [ Str "Here is a footnote reference," + , Note + [ Para + [ Str + "Here is the footnote. It can go anywhere after the footnote reference. It" + , SoftBreak + , Str "need not be placed at the end of the document." + ] + ] + , Str " and another." + , Note + [ Para + [ Str + "Here\8217s the long note. This one contains multiple blocks." + ] + , Para + [ Str + "Subsequent blocks are indented to show that they belong to the footnote (as" + , SoftBreak + , Str "with list items)." + ] + , CodeBlock ( "" , [ "" ] , [] ) "{ <code> }\n" + , Para + [ Str + "If you want, you can indent every line, but you can also be lazy and just" + , SoftBreak + , Str "indent the first line of each block." + ] + ] + , Str " This should " + , Emph [ Str "not" ] + , Str " be a" + , SoftBreak + , Str + "footnote reference, because it contains a space.[^my note] Here is an inline" + , SoftBreak + , Str "note." + , Note + [ Para + [ Str "This is " + , Emph [ Str "easier" ] + , Str " to type. Inline notes may contain" + , SoftBreak + , Link + ( "" , [] , [] ) + [ Str "links" ] + ( "http://google.com" , "" ) + , Str " and " + , Code ( "" , [] , [] ) "]" + , Str " verbatim characters, as well as" + , SoftBreak + , Str "[bracketed text]." + ] + ] + ] + , BlockQuote + [ Para + [ Str "Notes can go in quotes." + , Note [ Para [ Str "In quote." ] ] + ] + ] + , OrderedList + ( 1 , Decimal , Period ) + [ [ Plain + [ Str "And in list items." + , Note [ Para [ Str "In list." ] ] + ] + ] + ] + ] + ] |
