#======================================================================== # #
脚注プラグインです。
## 使い方は以下のように脚注の文章を書きます。 #
#
# {{fn この文章がfootnote_listで表示されます}}
#
# # このプラグインの表示自体は[1]とかになります。 #
# #======================================================================== package plugin::footnote::Footnote; use strict; #======================================================================== # コンストラクタ #======================================================================== sub new { my $class = shift; my $self = {}; $self->{count} = 1; return bless $self,$class; } #======================================================================== # インラインメソッド #======================================================================== sub inline { my $self = shift; my $wiki = shift; my $cgi = $wiki->get_CGI; my $text = shift; my $index = $self->{count}; my $note = {id => $index,text => $text}; $cgi->param("footnote",$note); $wiki->do_hook("footnote"); $self->{count}++; return "". "[".$index."]". ""; } 1;