Skip to content

Instantly share code, notes, and snippets.

@vkgtaro
Created August 25, 2009 16:44
Show Gist options
  • Save vkgtaro/174801 to your computer and use it in GitHub Desktop.
Save vkgtaro/174801 to your computer and use it in GitHub Desktop.
package MT::Plugin::TextLivedoorWiki;
use strict;
use warnings;
use utf8;
my $VERSION = "0.01";
use MT;
MT->add_text_filter(
text_livedoor_wiki => {
label => "LivedoorWiki",
on_format => sub {
my ( $text, $ctx ) = @_;
require Text::Livedoor::Wiki;
my $parser = Text::Livedoor::Wiki->new( {
opts => {
storage => 'http://static.wiki.livedoor.jp/formatter-storage'
}
} );
my $html = $parser->parse($text);
$html;
},
docs => "http://wiki.livedoor.jp/tag_guide/",
}
);
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment