# Blosxom Plugin: foreshortened
# Author(s): Rael Dornfest <rael@oreilly.com> 
# Version: 2.0b1
# Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/
# Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml

package foreshortened;

# --- Configurable variables -----

# --------------------------------

$body; # use as $foreshortened::body in flavour templates
$stripbody;

sub start {
  1;
}

sub story {
  my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;

  $body = $$body_ref;
  $body =~ s/<.+?>//gs;
  $body =~ s/[\.\!\?].+$/.../s;

  $stripbody = $body;
  $stripbody =~ s/&.+?;//gs;

  1;
}

1;
