Convert::Wiki::Node::Mono - Represents a monospaced text block


Convert-Wiki documentation Contained in the Convert-Wiki distribution.

Index


Code Index:

NAME

Top

Convert::Wiki::Node::Mono - Represents a monospaced text block

SYNOPSIS

Top

	use Convert::Wiki::Node::Mono;

	my $para = Convert::Wiki::Node->new( txt => 'Foo is a foobar.', type => 'mono' );

	print $para->as_wiki();		# print something like " Foo is a foorbar\n"

DESCRIPTION

Top

A Convert::Wiki::Node::Mono represents an monospaced textblock.

EXPORT

Top

None by default.

SEE ALSO

Top

Convert::Wiki::Node.

AUTHOR

Top

Tels http://bloodgate.com

COPYRIGHT AND LICENSE

Top


Convert-Wiki documentation Contained in the Convert-Wiki distribution.

#############################################################################
# (c) by Tels 2004. Part of Convert::Wiki
#
# represents monospaced text blocks (aka <pre>)
#############################################################################

package Convert::Wiki::Node::Mono;

use 5.006001;
use strict;
use warnings;

use Convert::Wiki::Node;

use vars qw/$VERSION @ISA/;

@ISA = qw/Convert::Wiki::Node/;

$VERSION = '0.03';

#############################################################################

sub _as_wiki
  {
  my ($self,$txt) = @_;

  # " Foo bar is baz.\n Baz.\n"
 
  $txt =~ s/\n/\n /g;

  ' ' . $txt . "\n\n";
  }

sub interlink
  {
  # no interlinking in monospaced paragraphs!
  my ($self, $wiki) = @_;

  $self->{txt};
  }

1;
__END__