From 89ed7e8c3ad8f7f89735c14cb7f6d7f0ca104b62 Mon Sep 17 00:00:00 2001 From: takezoe Date: Thu, 1 Dec 2011 15:22:15 +0000 Subject: [PATCH] =?utf8?q?memo=E3=83=97=E3=83=A9=E3=82=B0=E3=82=A4?= =?utf8?q?=E3=83=B3=E3=81=A7=E5=90=8D=E5=89=8D=E3=82=92=E6=9B=B8=E3=81=91?= =?utf8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- takezoe/plugin/book/Memo.pm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/takezoe/plugin/book/Memo.pm b/takezoe/plugin/book/Memo.pm index 427b872..1af70ee 100644 --- a/takezoe/plugin/book/Memo.pm +++ b/takezoe/plugin/book/Memo.pm @@ -27,12 +27,26 @@ sub new { sub inline { my $self = shift; my $wiki = shift; + my $name = shift; my $text = shift; - push(@{$self->{'memolist'}}, "[comment]".$text); + if($text eq ''){ + $text = $name; + $name = ''; + } + + if($name ne ''){ + push(@{$self->{'memolist'}}, "[comment]".$name." - ".$text); + } else { + push(@{$self->{'memolist'}}, "[comment]".$text); + } my @list = @{$self->{'memolist'}}; - return ''.Util::escapeHTML($text).''; + if($name ne ''){ + return ''.Util::escapeHTML($name).' - '.Util::escapeHTML($text).''; + } else { + return ''.Util::escapeHTML($text).''; + } } 1; -- 2.11.0