ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/pod2wiki
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/pod2wiki (file contents):
Revision 1.2 by root, Sun Aug 13 03:20:56 2006 UTC vs.
Revision 1.3 by root, Sun Aug 13 18:48:57 2006 UTC

9use Pod::POM; 9use Pod::POM;
10 10
11our @result; 11our @result;
12our $indent; 12our $indent;
13our $level; 13our $level;
14
15my $MA_BEG = "\x{fcd0}";
16my $MA_SEP = "\x{fcd1}";
17my $MA_END = "\x{fcd2}";
14 18
15sub asxml($) { 19sub asxml($) {
16 local $_ = $_[0]; 20 local $_ = $_[0];
17 21
18 s/&/&/g; 22 s/&/&/g;
54} 58}
55 59
56sub view_seq_link { 60sub view_seq_link {
57 my (undef, $link) = @_; 61 my (undef, $link) = @_;
58 62
59 # TODO: 63 if ($link =~ /http:/) {
60 # http://...
61 # ref
62 # pod/ref
63
64 "<u>" . (::asxml $_[1]) . "</u>"; 64 "<u>" . (::asxml $link) . "</u>"
65 } else {
66 "${MA_BEG}link${MA_SEP}$link$MA_END"
67 }
65} 68}
66 69
67sub view_item { 70sub view_item {
68 push @result, { 71 push @result, {
69 indent => $indent * 8, 72 indent => $indent * 8,
144sub view_for { 147sub view_for {
145 if ($_[1]->format eq "image") { 148 if ($_[1]->format eq "image") {
146 push @result, { 149 push @result, {
147 indent => $indent * 16, 150 indent => $indent * 16,
148 level => $level, 151 level => $level,
149 markup => "\x{fffc}", 152 markup => "${MA_BEG}image${MA_SEP}pod/" . $_->text . $MA_END,
150 widget => [["CFPlus::UI::Image" => path => "pod/" . $_[1]->text]],
151 }; 153 };
152 } 154 }
153 () 155 ()
154} 156}
155 157

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines