git.iko.soy/typeable/pandoc
on master help sign in
Updated html reader for new automatic header attributes.
commit3ad474e2cfc9432850fdea1f896a2db7ec852947 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 8 Aug 2015, 20:55 (11 years ago) parent467e3be
1 file changed+33−33
tests/html-reader.native+33−33
tests/html-reader.native+33−33
@@ -1,25 +1,25 @@
11Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]})
22[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."]
33,HorizontalRule
4−,Header 1 ("",[],[]) [Str "Headers"]
5−,Header 2 ("",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")]
6−,Header 3 ("",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
7−,Header 4 ("",[],[]) [Str "Level",Space,Str "4"]
8−,Header 5 ("",[],[]) [Str "Level",Space,Str "5"]
9−,Header 1 ("",[],[]) [Str "Level",Space,Str "1"]
10−,Header 2 ("",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
11−,Header 3 ("",[],[]) [Str "Level",Space,Str "3"]
4+,Header 1 ("headers",[],[]) [Str "Headers"]
5+,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")]
6+,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
7+,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"]
8+,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"]
9+,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"]
10+,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
11+,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"]
1212,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
13−,Header 2 ("",[],[]) [Str "Level",Space,Str "2"]
13+,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"]
1414,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
1515,HorizontalRule
16−,Header 1 ("",[],[]) [Str "Paragraphs"]
16+,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
1717,Para [Str "Here's",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
1818,Para [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."]
1919,Para [Str "Here's",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
2020,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Space,Str "here."]
2121,HorizontalRule
22−,Header 1 ("",[],[]) [Str "Block",Space,Str "Quotes"]
22+,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
2323,Para [Str "E-mail",Space,Str "style:"]
2424,BlockQuote
2525 [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
@@ -51,14 +51,14 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
5151 [Para [Str "Don't",Space,Str "quote",Space,Str "me."]]]
5252,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
5353,HorizontalRule
54−,Header 1 ("",[],[]) [Str "Code",Space,Str "Blocks"]
54+,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
5555,Para [Str "Code:"]
5656,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
5757,Para [Str "And:"]
5858,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
5959,HorizontalRule
60−,Header 1 ("",[],[]) [Str "Lists"]
61−,Header 2 ("",[],[]) [Str "Unordered"]
60+,Header 1 ("lists",[],[]) [Str "Lists"]
61+,Header 2 ("unordered",[],[]) [Str "Unordered"]
6262,Para [Str "Asterisks",Space,Str "tight:"]
6363,BulletList
6464 [[Plain [Str "asterisk",Space,Str "1"]]
@@ -89,7 +89,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
8989 [[Para [Str "Minus",Space,Str "1"]]
9090 ,[Para [Str "Minus",Space,Str "2"]]
9191 ,[Para [Str "Minus",Space,Str "3"]]]
92−,Header 2 ("",[],[]) [Str "Ordered"]
92+,Header 2 ("ordered",[],[]) [Str "Ordered"]
9393,Para [Str "Tight:"]
9494,OrderedList (1,DefaultStyle,DefaultDelim)
9595 [[Plain [Str "First"]]
@@ -129,7 +129,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
129129 []
130130,OrderedList (1,LowerRoman,DefaultDelim)
131131 []
132−,Header 2 ("",[],[]) [Str "Nested"]
132+,Header 2 ("nested",[],[]) [Str "Nested"]
133133,BulletList
134134 [[Plain [Str "Tab"]
135135 ,BulletList
@@ -154,7 +154,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
154154 ,[Plain [Str "Fie"]]
155155 ,[Plain [Str "Foe"]]]]
156156 ,[Para [Str "Third"]]]
157−,Header 2 ("",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
157+,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
158158,BulletList
159159 [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
160160 ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]
@@ -188,7 +188,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
188188 ,OrderedList (1,DefaultStyle,DefaultDelim)
189189 [[Plain [Str "Nested."]]]]]
190190,HorizontalRule
191−,Header 2 ("",[],[]) [Str "Definition"]
191+,Header 2 ("definition",[],[]) [Str "Definition"]
192192,DefinitionList
193193 [([Str "Violin"],
194194 [[Plain [Str "Stringed",Space,Str "musical",Space,Str "instrument."]]
@@ -196,7 +196,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
196196 ,([Str "Cello",LineBreak,Str "Violoncello"],
197197 [[Plain [Str "Low-voiced",Space,Str "stringed",Space,Str "instrument."]]])]
198198,HorizontalRule
199−,Header 1 ("",[],[]) [Str "Inline",Space,Str "Markup"]
199+,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
200200,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."]
201201,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."]
202202,Para [Str "Empty",Space,Strong [],Space,Str "and",Space,Emph [],Str "."]
@@ -208,7 +208,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
208208,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
209209,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "small",Space,Str "caps"],Str "."]
210210,HorizontalRule
211−,Header 1 ("",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
211+,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
212212,Para [Str "\"Hello,\"",Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Str "\"'Shelob'",Space,Str "is",Space,Str "my",Space,Str "name.\""]
213213,Para [Str "'A',",Space,Str "'B',",Space,Str "and",Space,Str "'C'",Space,Str "are",Space,Str "letters."]
214214,Para [Str "'Oak,'",Space,Str "'elm,'",Space,Str "and",Space,Str "'beech'",Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Str "'pine.'"]
@@ -218,7 +218,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
218218,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5-7,",Space,Str "255-66,",Space,Str "1987-1999."]
219219,Para [Str "Ellipses...and.",Space,Str ".",Space,Str ".and",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "."]
220220,HorizontalRule
221−,Header 1 ("",[],[]) [Str "LaTeX"]
221+,Header 1 ("latex",[],[]) [Str "LaTeX"]
222222,BulletList
223223 [[Plain [Str "\\cite[22-23]{smith.1899}"]]
224224 ,[Plain [Str "\\doublespacing"]]
@@ -237,7 +237,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
237237,Para [Str "Here's",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
238238,Para [Str "\\begin{tabular}{|l|l|}\\hline",Space,Str "Animal",Space,Str "&",Space,Str "Number",Space,Str "\\\\",Space,Str "\\hline",Space,Str "Dog",Space,Str "&",Space,Str "2",Space,Str "\\\\",Space,Str "Cat",Space,Str "&",Space,Str "1",Space,Str "\\\\",Space,Str "\\hline",Space,Str "\\end{tabular}"]
239239,HorizontalRule
240−,Header 1 ("",[],[]) [Str "Special",Space,Str "Characters"]
240+,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
241241,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
242242,BulletList
243243 [[Plain [Str "I",Space,Str "hat:",Space,Str "\206"]]
@@ -267,8 +267,8 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
267267,Para [Str "Plus:",Space,Str "+"]
268268,Para [Str "Minus:",Space,Str "-"]
269269,HorizontalRule
270−,Header 1 ("",[],[]) [Str "Links"]
271−,Header 2 ("",[],[]) [Str "Explicit"]
270+,Header 1 ("links",[],[]) [Str "Links"]
271+,Header 2 ("explicit",[],[]) [Str "Explicit"]
272272,Para [Str "Just",Space,Str "a",Space,Link [Str "URL"] ("/url/",""),Str "."]
273273,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."]
274274,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."]
@@ -277,7 +277,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
277277,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")]
278278,Para [Str "Email",Space,Str "link",Space,Str "(nobody",Space,Str "[at]",Space,Str "nowhere.net)"]
279279,Para [Link [Str "Empty"] ("",""),Str "."]
280−,Header 2 ("",[],[]) [Str "Reference"]
280+,Header 2 ("reference",[],[]) [Str "Reference"]
281281,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
282282,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
283283,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
@@ -290,12 +290,12 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
290290,CodeBlock ("",[],[]) "[not]: /url"
291291,Para [Str "Foo",Space,Link [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."]
292292,Para [Str "Foo",Space,Link [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."]
293−,Header 2 ("",[],[]) [Str "With",Space,Str "ampersands"]
293+,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"]
294294,Para [Str "Here's",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
295295,Para [Str "Here's",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT&T"] ("http://att.com/","AT&T"),Str "."]
296296,Para [Str "Here's",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
297297,Para [Str "Here's",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
298−,Header 2 ("",[],[]) [Str "Autolinks"]
298+,Header 2 ("autolinks",[],[]) [Str "Autolinks"]
299299,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
300300,BulletList
301301 [[Plain [Str "In",Space,Str "a",Space,Str "list?"]]
@@ -307,12 +307,12 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
307307,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
308308,CodeBlock ("",[],[]) "or here: <http://example.com/>"
309309,HorizontalRule
310−,Header 1 ("",[],[]) [Str "Images"]
310+,Header 1 ("images",[],[]) [Str "Images"]
311311,Para [Str "From",Space,Str "\"Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune\"",Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
312312,Para [Image [Str "lalune"] ("lalune.jpg","Voyage dans la Lune")]
313313,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon."]
314314,HorizontalRule
315−,Header 1 ("",[],[]) [Str "Footnotes"]
315+,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
316316,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Link [Str "(1)"] ("#note_1",""),Str ",",Space,Str "and",Space,Str "another",Link [Str "(longnote)"] ("#note_longnote",""),Str ".",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space^(my",Space,Str "note)."]
317317,Para [Link [Str "(1)"] ("#ref_1",""),Space,Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "in",Space,Str "the",Space,Str "document,",Space,Str "not",Space,Str "just",Space,Str "at",Space,Str "the",Space,Str "end."]
318318,Para [Link [Str "(longnote)"] ("#ref_longnote",""),Space,Str "Here's",Space,Str "the",Space,Str "other",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."]
@@ -323,8 +323,8 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
323323,Para [Emph [Str "Trailing",Space,Str "space"],Space,Str "text"]
324324,Para [Str "text",Space,Emph [Str "Leading",Space,Str "spaces"]]
325325,Para [Emph [Str "Trailing",Space,Str "spaces"],Space,Str "text"]
326−,Header 1 ("",[],[]) [Str "Tables"]
327−,Header 2 ("",[],[]) [Str "Tables",Space,Str "with",Space,Str "Headers"]
326+,Header 1 ("tables",[],[]) [Str "Tables"]
327+,Header 2 ("tables-with-headers",[],[]) [Str "Tables",Space,Str "with",Space,Str "Headers"]
328328,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
329329 [[Plain [Str "X"]]
330330 ,[Plain [Str "Y"]]
@@ -423,7 +423,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
423423 ,[[Plain [Str "4"]]
424424 ,[Plain [Str "5"]]
425425 ,[Plain [Str "6"]]]]
426−,Header 2 ("",[],[]) [Str "Tables",Space,Str "without",Space,Str "Headers"]
426+,Header 2 ("tables-without-headers",[],[]) [Str "Tables",Space,Str "without",Space,Str "Headers"]
427427,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
428428 []
429429 [[[Plain [Str "1"]]
@@ -459,5 +459,5 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
459459 ,[[Plain [Str "4"]]
460460 ,[Plain [Str "5"]]
461461 ,[Plain [Str "6"]]]]
462−,Header 2 ("",[],[]) [Str "Empty",Space,Str "Tables"]
462+,Header 2 ("empty-tables",[],[]) [Str "Empty",Space,Str "Tables"]
463463,Para [Str "This",Space,Str "section",Space,Str "should",Space,Str "be",Space,Str "empty."]]