ulist($l);
next;
}
+ elsif( $l =~ m/^☆begin-column:/ ) {
+ begin_column($l);
+ next;
+ }
+ elsif( $l =~ m/^☆end-column/ ) {
+ end_column($l);
+ next;
+ }
elsif( $l =~ m/^☆space$/ ) {
space($l);
next;
print $l, "\n";
next;
}
+ elsif( $l =~ m/^☆\+---$/ ) {
+ code($l);
+ next;
+ }
elsif( $l =~ m/^☆表/ ) {
table($l);
next;
next;
}
+
if( $l =~ m/^ / ) {
$l = "<p>$l</p>";
}
print "</ul>\n\n";
}
+sub begin_column {
+ my $l = shift @_;
+
+ my $title = "";
+ if( $l =~ m/^☆begin-column:(.*)$/ ) {
+ $title = $1;
+ }
+ my $html = << "EOL";
+<table bgcolor="#DDDDDD" border="0" cellpadding="6" width="95%">
+<tr>
+<th>$title</th>
+</tr>
+<tr>
+<td>
+<span style="font-size: 85%;;">
+EOL
+
+ print $html;
+}
+
+sub end_column {
+ my $l = shift @_;
+ my $html = << "EOL";
+</span>
+</td>
+</tr>
+</table>
+EOL
+ print $html;
+}
+
sub list {
my $l = shift @_;
my $cap = "";
print list_end();
}
+sub code {
+ my $l = shift @_;
+ my $cap = "";
+
+ print list_start();
+ while( $l = <> ) {
+ chomp $l;
+ $l =~ s/&/&/g;
+ $l =~ s/</</g;
+ $l =~ s/>/>/g;
+
+ if( $l =~ m/^[+-]---$/ ) {
+ last;
+ }
+ print $l, "\n";
+ }
+ print list_end();
+}
+
sub list_start {
return "<pre>\n";
}