Permalink
Browse files

Support empty links in new formatter

git-svn-id: http://svn.kwiki.org/kwiki/trunk/src/ingy/WikiText@338 4b3b33bc-d223-0410-9309-b363ae52eedd
  • Loading branch information...
ingy
ingy committed Feb 26, 2008
1 parent 2479fb0 commit 3217c902d14f21e1e17ea5f1d59321c0f6a1a928
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/WikiText/HTML/Emitter.pm
@@ -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 {

0 comments on commit 3217c90

Please sign in to comment.