Skip to content

Commit

Permalink
Support empty links in new formatter
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.kwiki.org/kwiki/trunk/src/ingy/WikiText@338 4b3b33bc-d223-0410-9309-b363ae52eedd
  • Loading branch information
ingy committed Feb 26, 2008
1 parent 2479fb0 commit 3217c90
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/WikiText/HTML/Emitter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ sub begin_wikilink {
my $link = $self->{callbacks}{wikilink}
? $self->{callbacks}{wikilink}->($node)
: CGI::Util::escape($node->{attributes}{target});
return qq{<a href="$link">};

my $class = $node->{attributes}{class};
$class = $class ? qq{ class="$class"} : '';
return qq{<a href="$link"$class>};
}

sub end_node {
Expand Down

0 comments on commit 3217c90

Please sign in to comment.