-
-
Save hrkokw/2906a404fc947752367edc1d1a53eed9 to your computer and use it in GitHub Desktop.
Blosxom more plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: perl -*- | |
# vim: syntax=perl | |
# | |
# https://88171.net/blosxom-more-plugin | |
package more; | |
use strict; | |
use warnings; | |
our $truncated = 0; | |
sub start { | |
$blosxom::flavour eq $blosxom::default_flavour | |
&& $blosxom::path_info !~ /\.$blosxom::default_flavour$/; | |
} | |
sub story { | |
my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_; | |
$truncated = $$body_ref =~ s/^(.{1024}.*?)(?:\r?\n){2}.*/$1/s; | |
} | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment