diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 443b6b4702..7f08be66b4 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -2420,8 +2420,10 @@ sub _convert_heading_command($$$$$)
}
my $element_id = $self->command_id($command);
- $result .= ""
- if (defined($element_id) and $element_id ne '');
+ $result .= '
';
}
foreach my $command (keys(%sectioning_commands), 'node') {
@@ -4657,14 +4659,14 @@ sub _convert_element_type($$$$)
}
}
- my $result = '';
+ my $result = "
\n";
my $special_element;
if ($element->{'extra'}->{'special_element'}) {
$special_element = $element->{'extra'}->{'special_element'};
my $id = $self->command_id($element);
if ($id ne '') {
- $result .= "
\n";
+ $result = "
\n";
}
if ($self->get_conf('HEADERS')
# first in page
@@ -4691,19 +4693,19 @@ sub _convert_element_type($$$$)
if ($special_element_body eq '') {
return '';
}
- $result .= $special_element_body;
+ $result .= $special_element_body . '
';
} elsif (!$element->{'element_prev'}) {
$result .= $self->_print_title();
if (!$element->{'element_next'}) {
# only one element
my $foot_text = &{$self->{'format_footnotes_text'}}($self);
- return $result.$content.$foot_text.$self->get_conf('DEFAULT_RULE')."\n";
+ return $result.$content.$foot_text.$self->get_conf('DEFAULT_RULE')."
\n";
}
}
$result .= $content unless ($special_element);
$result .= &{$self->{'format_element_footer'}}($self, $type,
$element, $content);
- return $result;
+ return $result . "
";
}
sub _default_element_footer($$$$)