OSDN Git Service

リソースのパスのプレフィックス処理を修正。
[fswiki/sandbox.git] / takezoe / plugin / book / Chapter.pm
1 ################################################################################
2 #
3 # <p>¾Ï¤Î¸«½Ð¤·¤ò½ÐÎϤ¹¤ë¥Ñ¥é¥°¥é¥Õ¥×¥é¥°¥¤¥ó¡£</p>
4 # <pre>
5 # {{chapter 1,¤Ï¤¸¤á¤Ë}}
6 # </pre>
7 # <p>
8 #   Â¾¤Î¥×¥é¥°¥¤¥ó¤Ç¤Ï¤³¤Î¥×¥é¥°¥¤¥ó¤ÇÄêµÁ¤·¤¿¾ÏÈÖ¹æ¤ò»È¤Ã¤Æ¿ÞɽÈÖ¹æ¤Ê¤É¤ò¿¶¤Ã¤Æ
9 #   ¤¤¤ë¤¿¤á¡¢1¥Ú¡¼¥¸¤ËºÇÄã1¤Ä¤Ï¤³¤Î¥×¥é¥°¥¤¥ó¤òµ­½Ò¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
10 # </p>
11 #
12 ################################################################################
13 package plugin::book::Chapter;
14 #==============================================================================
15 # ¥³¥ó¥¹¥È¥é¥¯¥¿
16 #==============================================================================
17 sub new {
18         my $class = shift;
19         my $self = {};
20         return bless $self,$class;
21 }
22
23 #==============================================================================
24 # ¥Ñ¥é¥°¥é¥Õ¥á¥½¥Ã¥É
25 #==============================================================================
26 sub paragraph {
27         my $self    = shift;
28         my $wiki    = shift;
29         my $chapter = shift;
30         my $title   = shift;
31         
32         $self->{'chapter'} = $chapter;
33         $wiki->do_hook('chapter');
34         
35         return '<div class="chapter"><a name="chapter"'.$chapter.'>Chapter '.$chapter.'. '.Util::escapeHTML($title).'</a></div>';
36 }
37
38 1;