.
License: GPL-1.0+ or Artistic-1.0
Files: inc/Module/Install/Makefile.pm
Copyright: Copyright 2002, 2003, 2004 Audrey Tang and Brian Ingerson.
License: GPL-1.0+ or Artistic-1.0
Files: t/01basic.t
Copyright: Copyright (C) 2010-2012 by Toby Inkster.
License: GPL-1.0+ or Artistic-1.0
Files: lib/HTML/HTML5/Parser/Error.pm
Copyright: Copyright (C) 2011-2012 by Toby Inkster.
License: GPL-1.0+ or Artistic-1.0
Files: lib/HTML/HTML5/Parser.pm
Copyright: Copyright (C) 2007-2011 by Wakaba.
Copyright (C) 2009-2012 by Toby Inkster.
License: GPL-1.0+ or Artistic-1.0
Files: inc/YAML/Tiny.pm
Copyright: Copyright 2006 - 2012 Adam Kennedy.
License: GPL-1.0+ or Artistic-1.0
License: Artistic-1.0
This software is Copyright (c) 2013 by the copyright holder(s).
This is free software, licensed under:
The Artistic License 1.0
License: GPL-1.0
This software is Copyright (c) 2013 by the copyright holder(s).
This is free software, licensed under:
The GNU General Public License, Version 1, February 1989
HTML-HTML5-Parser-0.301/NEWS 0000644 0001750 0001750 00000000511 12165630111 013146 0 ustar tai tai 2013-07-05 HTML-HTML5-Parser-0.300
==================================
Fixed (DORIAN++) some major memory leaks at the expense of some minor API
changes.
2012-03-15 HTML-HTML5-Parser-0.109
==================================
We now bundle the tree construction parts of the html5lib test suite, and
pass more than half of it.
HTML-HTML5-Parser-0.301/t/ 0000755 0001750 0001750 00000000000 12166545247 012735 5 ustar tai tai HTML-HTML5-Parser-0.301/t/05origins.t 0000644 0001750 0001750 00000006240 12165411225 014726 0 ustar tai tai ## skip Test::Tabs
use Test::More tests => 29;
use HTML::HTML5::Parser;
my $dom = HTML::HTML5::Parser->load_html(string => <<'HTML');
Test 5: Origins
This is
a
test!
HTML
can_ok 'HTML::HTML5::Parser' => 'source_line'
or BAIL_OUT('No "source_line" method!!');
my @root = HTML::HTML5::Parser->source_line($dom->documentElement);
is($root[0], 2, 'root element has correct line number');
is($root[1], 1, 'root element has correct col number');
ok(!$root[2], 'root element explicit');
my @head = HTML::HTML5::Parser->source_line($dom->getElementsByTagName('head')->get_node(1));
ok(defined $head[0], 'head element has a line number');
ok(defined $head[1], 'head element has a col number');
ok($head[2], 'head element implicit');
my @title_text = HTML::HTML5::Parser->source_line($dom->getElementsByTagName('title')->get_node(1)->childNodes->get_node(1));
is($title_text[0], 3, 'text node in title element has a line number');
is($title_text[1], 10, 'text node in title element has a col number');
ok(!$title_text[2], 'text node in title element explicit');
my @para = HTML::HTML5::Parser->source_line($dom->getElementsByTagName('p')->get_node(1));
is($para[0], 4, 'p element has correct line number');
is($para[1], 3, 'p element has correct col number');
ok(!$para[2], 'para element explicit');
my $para = HTML::HTML5::Parser->source_line($dom->getElementsByTagName('p')->get_node(1));
is($para, 4, 'p element has correct line number (scalar context)');
my @b = HTML::HTML5::Parser->source_line($dom->getElementsByTagName('b')->get_node(1));
is($b[0], 5, 'b element has correct line number');
is($b[1], 5, 'b element has correct col number');
ok(!$b[2], 'b element explicit');
my @i = HTML::HTML5::Parser->source_line($dom->getElementsByTagName('i')->get_node(1));
is($i[0], 5, 'i element has correct line number');
is($i[1], 17, 'i element has correct col number');
ok(!$i[2], 'i element explicit');
my @a = HTML::HTML5::Parser->source_line($dom->getElementsByTagName('a')->get_node(1));
is($a[0], 6, 'a element has correct line number');
is($a[1], 5, 'a element has correct col number');
ok(!$a[2], 'a element explicit');
my @href = HTML::HTML5::Parser->source_line($dom->getElementsByTagName('a')->get_node(1)->getAttributeNode('href'));
is($href[0], 6, 'href attribute has correct line number');
is($href[1], 8, 'href attribute has correct col number');
ok(!$href[2], 'href attribute explicit');
# It's not easy to actually find comments in the DOM!
my $comment = $dom->getElementsByTagName('p')->[0]->childNodes->[-2];
my @comment = HTML::HTML5::Parser->source_line($comment);
is($comment[0], 8, 'comment has correct line number')
or diag($comment->toString);
is($comment[1], 5, 'comment has correct col number');
ok(!$comment[2], 'comment is explicit');
=head1 PURPOSE
Check that line/column numbers are reported.
=head1 AUTHOR
Toby Inkster, Etobyink@cpan.orgE
=head1 COPYRIGHT AND LICENCE
Copyright (C) 2012 by Toby Inkster
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
HTML-HTML5-Parser-0.301/t/01basic.t 0000644 0001750 0001750 00000001337 12165411240 014330 0 ustar tai tai ## skip Test::Tabs
use Test::More tests => 3;
BEGIN { use_ok('HTML::HTML5::Parser') };
my $parser = new_ok 'HTML::HTML5::Parser';
can_ok $parser, qw/
parse_file parse_html_file
parse_fh parse_html_fh
parse_string parse_html_string
parse_balanced_chunk
load_xml load_html
error_handler errors
compat_mode dtd_public_id dtd_system_id dtd_element
source_line
/;
=head1 PURPOSE
Test that L can be loaded and instantiated, and that
the object has the expected methods.
=head1 AUTHOR
Toby Inkster, Etobyink@cpan.orgE
=head1 COPYRIGHT AND LICENCE
Copyright (C) 2010-2012 by Toby Inkster
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
HTML-HTML5-Parser-0.301/t/html5lib-pass/ 0000755 0001750 0001750 00000000000 12166545247 015421 5 ustar tai tai HTML-HTML5-Parser-0.301/t/html5lib-pass/scriptdata01.dat 0000644 0001750 0001750 00000010301 11726072634 020401 0 ustar tai tai #data
FOOBAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| " dd>BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR"
#data
FOOBAR
#errors
#document
|
|
|
| "FOO"
| BAR"
#data
FOOBAR
#errors
#document
|
|
|
| "FOO"
| BAR"
#data
FOOBAR
#errors
#document
|
|
|
| "FOO"
| BAR
#errors
#document
|
|
|
| "FOO"
| BAR"
#data
FOOBAR
#errors
#document
|
|
|
| "FOO"
| BAR"
#data
FOOBAR
#errors
#document
|
|
|
| "FOO"
| BAR"
#data
FOOBAR
#errors
#document
|
|
|
| "FOO"
| BAR"
#data
FOOBAR
#errors
#document
|
|
|
| "FOO"
| BARQUX
#errors
#document
|
|
|
| "FOO"
| BAR"
| "QUX"
HTML-HTML5-Parser-0.301/t/html5lib-pass/comments01.dat 0000644 0001750 0001750 00000003045 11726072634 020077 0 ustar tai tai #data
FOOBAZ
#errors
#document
|
|
|
| "FOO"
|
| "BAZ"
#data
FOOBAZ
#errors
#document
|
|
|
| "FOO"
|
| "BAZ"
#data
FOO
#data
FOOBAZ
#errors
#document
|
|
|
| "FOO"
|
| "BAZ"
#data
FOOBAZ
#errors
#document
|
|
|
| "FOO"
|
| "BAZ"
#data
FOO
#data
FOOBAZ
#errors
#document
|
|
|
| "FOO"
|
| "BAZ"
#data
FOOBAZ
#errors
#document
|
|
|
| "FOO"
|
| "BAZ"
#data
FOOBAZ
#errors
#document
|
|
|
| "FOO"
|
| "BAZ"
#data
Hi
#errors
#document
|
|
|
|
| "Hi"
#data
#errors
#document
|
|
|
|
#data
|
|
|
#data
FOOBAZ
#errors
#document
|
|
|
| "FOO"
|
| "BAZ"
HTML-HTML5-Parser-0.301/t/html5lib-pass/pending-spec-changes-plain-text-unsafe.dat 0000644 0001750 0001750 00000000163 11726072634 025433 0 ustar tai tai #data