root/lang/perl/blosxom/plugins/hatena

Revision 6725, 0.6 kB (checked in by yoko, 2 years ago)

lang/perl/blosxom/plugins/hatena: はてな記法プラグイン

Line 
1# Blosxom Plugin: hatena
2# Author: yoko <clothfairy@gmail.com>
3# Version: 2008-02-15
4# Blosxom Home/Docs/Licensing: http://www.blosxom.com/
5
6package hatena;
7
8use strict;
9use Text::Hatena;
10
11# --- Configurable variables -----------
12
13my $use_meta = 1;
14
15# --- Plug-in package variables --------
16
17# --------------------------------------
18
19sub start { 1; }
20
21sub story {
22        my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
23
24        return 1 if (!$use_meta or defined($meta::markup) and $meta::markup =~ /^\s*hatena\s*$/i);
25
26        $$body_ref = Text::Hatena->parse($$body_ref);
27        1;
28}
29
301;
Note: See TracBrowser for help on using the browser.