--- textile.pm.orig Fri May 21 00:37:39 2004
+++ textile.pm Fri May 21 01:16:38 2004
@@ -83,13 +83,14 @@
# strip out line breaks within pre blocks for restoration later...
$str =~ s|(
)(.+?)()|"\n\n".$1._savebreaks($2).$3."\n\n"|ges;
- $str =~ s!(<(h[1-6]|p|pre|blockquote).*?>)(.+?)(\2>)!"\n\n".$1.$3.$4."\n\n"!ges;
+ $str =~ s!(<(h[1-6]|div|p|pre|blockquote|table|ol|dl|ul|menu|dir|center|form|fieldset|address|hr).*?>)(.+?)(\2>)!"\n\n".$1.$3.$4."\n\n"!ges;
$str =~ s/\r//g;
my @paras = split /\n{2,}/, $str;
my $out = '';
my $in_pre = 0;
+ my $in_math = 0;
my $no_fmt = 0;
foreach my $para (@paras) {
@@ -134,7 +135,8 @@
@lines = split /\n/, $para;
}
- $in_pre = 1 if $para =~ m|]|;
+ $in_pre = 1 if $para =~ m/]/;
+ $in_math = 1 if $para =~ m/
|;
+ $in_pre = 0 if $para =~ m/<\/pre>/;
+ $in_math = 0 if $para =~ m/<\/math>/;
}
$out =~ s/\n\n$//s;