my $content=shift;
my $oneline = $content !~ /\n/;
-
+
if (exists $hooks{htmlize}{$type}) {
$content=$hooks{htmlize}{$type}{call}->(
page => $page,
if ($oneline) {
# hack to get rid of enclosing junk added by markdown
- # and other htmlizers
+ # and other htmlizers/sanitizers
$content=~s/^<p>//i;
- $content=~s/<\/p>$//i;
- chomp $content;
+ $content=~s/<\/p>\n*$//i;
}
return $content;
return IkiWiki::FailReason->new("$page does not link to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1);
}
-sub match_typedlink($$;@) {
- my $page = shift;
- my $args = shift;
-
- if ($args =~ /^(\w+)\s+(.*)$/) {
- return match_link($page, $2, @_, linktype => $1);
- }
-
- return IkiWiki::ErrorReason->new("typedlink expects e.g. 'tag *' but got: $args");
-}
-
sub match_backlink ($$;@) {
my $ret=match_link($_[1], $_[0], @_);
$ret->influences($_[1] => $IkiWiki::DEPEND_LINKS);