pandoc/test/man-reader.native
John MacFarlane a9fc71118f Man reader: major restructuring, support macros.
- Improved support for custom macro definitions.
- LinePart type has been added. RoffStr is now one
  constructor of LinePart (the other being MacroArg).
- MComment has lost its argument.
- MEndMacro has been removed.
- MStr has been removed (we now simply use LinePart).
- Macros now store a list of tokens.
- Each macro argument is a [LinePart], instead of a LinePart.
- .BR now behaves as documented in man (and doesn't create a link).
2018-10-20 15:57:34 -07:00

101 lines
4.8 KiB
Text

Pandoc (Meta {unMeta = fromList [("date",MetaInlines [Str "Oct",Space,Str "17,",Space,Str "2018"]),("section",MetaInlines []),("title",MetaInlines [Str "Pandoc",Space,Str "Man",Space,Str "tests"])]})
[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc."]
,Para [Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]
,Header 1 ("",[],[]) [Str "Headers"]
,Header 1 ("",[],[]) [Str "Level",Space,Str "1"]
,Header 2 ("",[],[]) [Str "Level",Space,Str "2"]
,Para [Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]
,Header 1 ("",[],[]) [Str "Paragraphs"]
,Para [Str "Here's",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
,Para [Str "Another",Space,Str "paragraph",Space,Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break"]
,Para [Str "here."]
,Para [Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]
,Header 1 ("",[],[]) [Str "Block",Space,Str "Quotes"]
,Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
,BlockQuote
[CodeBlock ("",[],[]) "\nsub status {\n print \"working\";\n}"]
,Para [Str "A",Space,Str "list:"]
,OrderedList (1,Decimal,Period)
[[Para [Str "item",Space,Str "one"]]
,[Para [Str "item",Space,Str "two"]]]
,Header 1 ("",[],[]) [Str "Code",Space,Str "Blocks"]
,Para [Str "Code:"]
,CodeBlock ("",[],[]) "\n---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n"
,Para [Str "And:"]
,CodeBlock ("",[],[]) "\n\tthis code line is indented by one tab"
,Para [Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]
,Header 1 ("",[],[]) [Str "Lists"]
,Header 2 ("",[],[]) [Str "Unordered"]
,Para [Str "Asterisks:"]
,BulletList
[[Para [Str "asterisk",Space,Str "1"]]
,[Para [Str "asterisk",Space,Str "2"]]
,[Para [Str "asterisk",Space,Str "3"]]]
,Header 2 ("",[],[]) [Str "Ordered"]
,OrderedList (1,Decimal,Period)
[[Para [Str "First"]]
,[Para [Str "Second"]]
,[Para [Str "Third"]]]
,Header 2 ("",[],[]) [Str "Nested"]
,BulletList
[[Para [Str "Tab"]
,BulletList
[[Para [Str "Tab"]
,BulletList
[[Para [Str "Tab"]]]]]]]
,Para [Str "Here's",Space,Str "another:"]
,OrderedList (1,Decimal,Period)
[[Para [Str "First"]]
,[Para [Str "Second:"]
,BulletList
[[Para [Str "Fee"]]
,[Para [Str "Fie"]]
,[Para [Str "Foe"]]]]
,[Para [Str "Third"]]]
,Para [Str "Same",Space,Str "thing:"]
,OrderedList (1,Decimal,Period)
[[Para [Str "First"]]
,[Para [Str "Second:"]
,BulletList
[[Para [Str "Fee"]]
,[Para [Str "Fie"]]
,[Para [Str "Foe"]]]]
,[Para [Str "Third"]]]
,Header 2 ("",[],[]) [Str "different",Space,Str "styles:"]
,OrderedList (1,UpperAlpha,Period)
[[Para [Str "Upper",Space,Str "Alpha"]
,OrderedList (1,UpperRoman,Period)
[[Para [Str "Upper",Space,Str "Roman."]
,OrderedList (6,Decimal,TwoParens)
[[Para [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
,OrderedList (3,LowerAlpha,OneParen)
[[Para [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]]
,Header 2 ("",[],[]) [Str "Ordered"]
,Para [Str "Definition",Space,Str "lists"]
,DefinitionList
[([Strong [Str "term1"]],
[[Para [Str "definition",Space,Str "1"]
,Para [Str "continued"]]])
,([Strong [Str "term2"]],
[[Para [Str "definition",Space,Str "2",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]]])]
,Header 1 ("",[],[]) [Str "Special",Space,Str "Characters"]
,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
,Para [Str "4",Space,Str "<",Space,Str "5."]
,Para [Str "6",Space,Str ">",Space,Str "5."]
,Para [Str "Backslash:",Space,Str "\\"]
,Para [Str "Backtick:",Space,Str "`"]
,Para [Str "Asterisk:",Space,Str "*"]
,Para [Str "Underscore:",Space,Str "_"]
,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
,Para [Str "Left",Space,Str "paren:",Space,Str "("]
,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
,Para [Str "Greater-than:",Space,Str ">"]
,Para [Str "Hash:",Space,Str "#"]
,Para [Str "Period:",Space,Str "."]
,Para [Str "Bang:",Space,Str "!"]
,Para [Str "Plus:",Space,Str "+"]
,Para [Str "Minus:",Space,Str "-"]]