* toc: Handle html elements embedded inside a header, rather than
stopping collecting the header text at the first element.master
parent
e72825619d
commit
c9c0f271b6
|
@ -86,17 +86,25 @@ sub format (@) { #{{{
|
||||||
}
|
}
|
||||||
$liststarted=0;
|
$liststarted=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$index.=&$indent."</li>\n" unless $liststarted;
|
||||||
|
$liststarted=0;
|
||||||
|
$index.=&$indent."<li class=\"L$curlevel\">".
|
||||||
|
"<a href=\"#$anchor\">";
|
||||||
|
|
||||||
$p->handler(text => sub {
|
$p->handler(text => sub {
|
||||||
$page.=join("", @_);
|
$page.=join("", @_);
|
||||||
$index.=&$indent."</li>\n" unless $liststarted;
|
$index.=join("", @_);
|
||||||
$liststarted=0;
|
|
||||||
$index.=&$indent."<li class=\"L$curlevel\">".
|
|
||||||
"<a href=\"#$anchor\">".
|
|
||||||
join("", @_).
|
|
||||||
"</a>\n";
|
|
||||||
$p->handler(text => undef);
|
|
||||||
}, "dtext");
|
}, "dtext");
|
||||||
|
$p->handler(end => sub {
|
||||||
|
my $tagname=shift;
|
||||||
|
if ($tagname =~ /^h(\d+)$/i) {
|
||||||
|
$p->handler(text => undef);
|
||||||
|
$p->handler(end => undef);
|
||||||
|
$index.="</a>\n";
|
||||||
|
}
|
||||||
|
$page.=join("", @_);
|
||||||
|
}, "tagname, text");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$page.=$text;
|
$page.=$text;
|
||||||
|
|
|
@ -24,6 +24,8 @@ ikiwiki (2.13) UNRELEASED; urgency=low
|
||||||
directories, to improve browsing of file:// urls.
|
directories, to improve browsing of file:// urls.
|
||||||
Patch by Daniel Burrows. Closes: #451728
|
Patch by Daniel Burrows. Closes: #451728
|
||||||
* Allow html5 video and audio tags and their attributes in the htmlscrubber.
|
* Allow html5 video and audio tags and their attributes in the htmlscrubber.
|
||||||
|
* toc: Handle html elements embedded inside a header, rather than
|
||||||
|
stopping collecting the header text at the first element.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Sat, 17 Nov 2007 19:56:46 -0500
|
-- Joey Hess <joeyh@debian.org> Sat, 17 Nov 2007 19:56:46 -0500
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue