Súbor: [Platon] / iotta / Iotta / Format / In / TextPre.pm (stiahnutie)
Revízia 1.2, Sun Mar 23 11:29:58 2003 UTC (21 years ago) by yenar
Zmeny od 1.1: +6 -2
[lines]
use on line beginnings and make output more readable [Iotta/Format/In/TextPre.pm]
|
package Iotta::Format::In::TextPre;
use base Iotta::Elem;
use strict;
sub run {
my $s = shift;
my $m = shift;
my $in = shift;
my $out;
my $mark = "!\@CONVENIENCE LINEBREAK - bo <br>\@!";
print " parsing text format...\n";
$in =~ s/&/&/g;
$in =~ s/</</g;
$in =~ s/>/>/g;
$in =~ s/\n+$//;
$in =~ s/^((?: )*) /$1 /gsm;
$in =~ s/\n\n+/<\/p>$mark<p>/gsm;
$in =~ s/\n/<br\/>$mark/gsm;
$in =~ s/$mark/\n/gsm;
$out = "<iotta-ifmt><p>$in</p></iotta-ifmt>\n";
$s->next->run ($m, $out) if ($s->next);
}
sub setup {
my $self = shift;
my $o = shift;
}
sub initialize {
my $self = shift;
$self->SUPER::initialize (@_);
}
1;
Platon Group <platon@platon.sk> http://platon.sk/
|