Browse Source

+ add <u> and <b> handlers

master
Alex 'AdUser' Z 9 years ago
parent
commit
e0a6b44d04
  1. 8
      lib/Text/Dokuwiki/Render/Markdown.pm

8
lib/Text/Dokuwiki/Render/Markdown.pm

@ -28,6 +28,11 @@ sub _list {
return $text . "\n";
}
sub _wrap {
my ($self, $border, $attrs, $content) = @_;
return $border . $self->treewalk($content) . $border;
}
sub h1 { my $self = shift; $self->_header('h1', @_); };
sub h2 { my $self = shift; $self->_header('h2', @_); };
sub h3 { my $self = shift; $self->_header('h3', @_); };
@ -38,6 +43,9 @@ sub h6 { my $self = shift; $self->_header('h6', @_); };
sub ul { my $self = shift; $self->_list(@_); };
sub ol { my $self = shift; $self->_list(@_); };
sub b { my $self = shift; $self->_wrap('**', @_); } # bold
sub u { my $self = shift; $self->_wrap('*', @_); } # underline, replace with italics
sub div {
my ($self, $attrs, $content) = @_;
return $content;

Loading…
Cancel
Save