Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed small paragraph bug in Mojo::DOM::HTML
  • Loading branch information
kraih committed Dec 6, 2012
1 parent bbb5fab commit 8046ba6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -4,6 +4,7 @@
- Improved documentation.
- Improved tests.
- Fixed parameter replacement bug in Mojo::Parameters. (alexbyk, sri)
- Fixed small paragraph bug in Mojo::DOM::HTML.

3.64 2012-12-01
- Improved documentation.
Expand Down
16 changes: 7 additions & 9 deletions lib/Mojo/DOM/HTML.pm
Expand Up @@ -54,26 +54,24 @@ my %OPTIONAL = map { $_ => 1 }
# Elements that break HTML paragraphs
my %PARAGRAPH = map { $_ => 1 } (
qw(address article aside blockquote dir div dl fieldset footer form h1 h2),
qw(h3 h4 h5 h6 header hgroup hr menu nav ol p pre section table or ul)
qw(h3 h4 h5 h6 header hgroup hr menu nav ol p pre section table ul)
);

# HTML table elements
my %TABLE = map { $_ => 1 } qw(col colgroup tbody td th thead tr);

# HTML5 void elements
# HTML void elements
my %VOID = map { $_ => 1 } (
qw(area base br col command embed hr img input keygen link meta param),
qw(source track wbr)
);

# HTML4/5 inline elements
my @HTML4_INLINE = qw(applet basefont big del font iframe ins s strike u);
my @HTML5_INLINE = (
qw(a abbr acronym b bdo big br button cite code dfn em i img input kbd),
qw(label map object q samp script select small strong span sub sup),
qw(textarea tt var)
# HTML inline elements
my %INLINE = map { $_ => 1 } (
qw(a abbr acronym applet b basefont bdo big br button cite code del dfn em),
qw(font i iframe img ins input kbd label map object q s samp script select),
qw(small span strike strong sub sup textarea tt u var)
);
my %INLINE = map { $_ => 1 } @HTML4_INLINE, @HTML5_INLINE;

sub parse {
my ($self, $html) = @_;
Expand Down

0 comments on commit 8046ba6

Please sign in to comment.