--- deliantra/server/lib/cf/pod.pm 2007/07/03 01:10:38 1.8 +++ deliantra/server/lib/cf/pod.pm 2008/08/31 09:03:31 1.13 @@ -15,9 +15,8 @@ sub asxml($) { local $_ = $_[0]; - s/&/&/g; - s/>/>/g; - s//g; + s/>/E/g; $_ } @@ -35,8 +34,8 @@ *view_seq_file = *view_seq_code = -*view_seq_bold = sub { "$_[1]" }; -*view_seq_italic = sub { "$_[1]" }; +*view_seq_bold = sub { "B<$_[1]>" }; +*view_seq_italic = sub { "I<$_[1]>" }; *view_seq_zero = sub { }; *view_seq_space = sub { my $text = $_[1]; $text =~ s/ /\xa0/g; $text }; *view_seq_index = sub { push @{ $result[-1]{index} }, $_[1]; "" }; @@ -53,7 +52,7 @@ my $text = $link =~ s/^(.*)\|// ? $1 : $link; if ($link =~ /http:/) { - "" . (asxml $link) . "" + "U<" . (asxml $link) . ">" } else { () } @@ -78,7 +77,7 @@ type => "verbatim", indent => $indent * 16, level => $level, - markup => asxml $_[1], + markup => $_[1], }; () } @@ -185,18 +184,19 @@ my ($path) = @_; Coro::Storable::thaw cf::cache "cf::pod::as_paragraphs/$path" => [$path], - 1 => sub { + 3 => sub { my ($src) = @_; + cf::fork_call { my $pod = $src->[0]; utf8::decode $pod; - Coro::Storable::freeze pom_as_paragraphs +(Pod::POM->new->parse_text ($pod)) + Coro::Storable::blocking_nfreeze pom_as_paragraphs +(Pod::POM->new->parse_text ($pod)) } }; } # format as cfpod-style text -sub as_text($) { +sub as_cfpod($) { my ($pars) = @_; my $res;