Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed Mojo::DOM formatting
  • Loading branch information
kraih committed Jul 28, 2013
1 parent abb4c06 commit 805d75d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/Mojo/DOM.pm
Expand Up @@ -163,13 +163,6 @@ sub replace {
return $self->_replace($tree, $self->_parse("$new"));
}

sub strip {
my $self = shift;
my $tree = $self->tree;
return $self if $tree->[0] eq 'root';
return $self->_replace($tree, ['root', @$tree[4 .. $#$tree]]);
}

sub replace_content {
my ($self, $new) = @_;
my $tree = $self->tree;
Expand All @@ -190,6 +183,13 @@ sub root {
return $self->new->tree($root)->xml($self->xml);
}

sub strip {
my $self = shift;
my $tree = $self->tree;
return $self if $tree->[0] eq 'root';
return $self->_replace($tree, ['root', @$tree[4 .. $#$tree]]);
}

sub text {
my $tree = shift->tree;
return _text(_elements($tree), 0, _trim($tree, @_));
Expand Down

0 comments on commit 805d75d

Please sign in to comment.