diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-12-22 20:25:15 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-12-30 13:55:40 -0800 |
commit | 904050fa36715e18522d80432a2666fcbaacd105 (patch) | |
tree | 4745876e797d400539dd80309d31c330a013e969 /tests | |
parent | 220fe5fab89ce84fcb98f0430c4126281ca8362d (diff) | |
download | pandoc-904050fa36715e18522d80432a2666fcbaacd105.tar.gz |
New HTML reader using tagsoup as a lexer.
* The new reader is faster and more accurate.
* API changes for Text.Pandoc.Readers.HTML:
- removed rawHtmlBlock, anyHtmlBlockTag, anyHtmlInlineTag,
anyHtmlTag, anyHtmlEndTag, htmlEndTag, extractTagType,
htmlBlockElement, htmlComment
- added htmlTag, htmlInBalanced, isInlineTag, isBlockTag, isTextTag
* tagsoup is a new dependency.
* Text.Pandoc.Parsing: Generalized type on readWith.
* Benchmark.hs: Added length calculation to force full evaluation.
* Updated HTML reader tests.
* Updated markdown and textile readers to use the functions from
the HTML reader.
* Note: The markdown reader now correctly handles some cases it did not
before. For example:
<hr/>
is reproduced without adding a space.
<script>
a = '<b>';
</script>
is parsed correctly.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/html-reader.native | 8 | ||||
-rw-r--r-- | tests/testsuite.txt | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/html-reader.native b/tests/html-reader.native index 5bf6c1b5c..5b7749712 100644 --- a/tests/html-reader.native +++ b/tests/html-reader.native @@ -269,8 +269,8 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA , [ Plain [Str "section:",Space,Str "\167"] ] , [ Plain [Str "set",Space,Str "membership:",Space,Str "\8712"] ] , [ Plain [Str "copyright:",Space,Str "\169"] ] ] -, Para [Str "AT",Str "&",Str "T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name",Str "."] -, Para [Str "AT",Str "&",Str "T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it",Str "."] +, Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name",Str "."] +, Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it",Str "."] , Para [Str "This",Space,Str "&",Space,Str "that",Str "."] , Para [Str "4",Space,Str "<",Space,Str "5",Str "."] , Para [Str "6",Space,Str ">",Space,Str "5",Str "."] @@ -316,11 +316,11 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA , Para [Str "Foo",Space,Link [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."] , Header 2 [Str "With",Space,Str "ampersands"] , Para [Str "Here",Str "'",Str "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 "."] -, Para [Str "Here",Str "'",Str "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",Str "&",Str "T"] ("http://att.com/","AT&T"),Str "."] +, Para [Str "Here",Str "'",Str "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 "."] , Para [Str "Here",Str "'",Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] , Para [Str "Here",Str "'",Str "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 "."] , Header 2 [Str "Autolinks"] -, Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example",Str ".",Str "com/?foo=1",Str "&",Str "bar=2"] ("http://example.com/?foo=1&bar=2","")] +, Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example",Str ".",Str "com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")] , BulletList [ [ Plain [Str "In",Space,Str "a",Space,Str "list?"] ] , [ Plain [Link [Str "http://example",Str ".",Str "com/"] ("http://example.com/","")] ] diff --git a/tests/testsuite.txt b/tests/testsuite.txt index 91074efad..ccee0764a 100644 --- a/tests/testsuite.txt +++ b/tests/testsuite.txt @@ -431,21 +431,21 @@ Hr's: <hr> -<hr/> +<hr /> <hr /> <hr> -<hr/> +<hr /> <hr /> <hr class="foo" id="bar" /> -<hr class="foo" id="bar"/> +<hr class="foo" id="bar" /> -<hr class="foo" id="bar" > +<hr class="foo" id="bar"> ----- |