# -*- perl -*- # # Text::Smart::HTML by Daniel Berrange # # Copyright (C) 2000-2004 Daniel P. Berrange # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: HTML.pm,v 1.2 2004/12/31 16:00:45 dan Exp $ =pod =head1 NAME Text::Smart::HTML - Smart text outputter for HTML =head1 SYNOPSIS use Text::Smart::HTML; my $markup = Text::Smart::HTML->new(%params); =head1 DESCRIPTION =head1 METHODS =over 4 =cut package Text::Smart::HTML; use strict; use warnings; use Text::Smart; use vars qw(@ISA); @ISA = qw(Text::Smart); =item my $proc = Text::Smart::HTML->new(target => $target); Creates a new smart text processor which outputs HTML markup. The only C parameter is used to specify the hyperlink window target (via the 'target' attribute on the tag) =cut sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(); my %params = @_; $self->{target} = exists $params{target} ? $params{target} : undef; bless $self, $class; return $self; } =item my $markup = $proc->generate_divider Generates a horizontal divider using the
tag. =cut sub generate_divider { my $self = shift; return "
\n"; } =item my $markup = $proc->generate_itemize(@items) Generates an itemized list of bullet points using the