--- deliantra/Deliantra-Client/bin/pod2wiki 2006/08/14 14:35:31 1.7 +++ deliantra/Deliantra-Client/bin/pod2wiki 2006/09/09 23:31:58 1.10 @@ -39,6 +39,10 @@ $_ } +sub special { + $MA_BEG . (join $MA_SEP, @_) . $MA_END +} + package AsParagraphs; use strict; @@ -70,9 +74,9 @@ my $path = $1; (my $base = $path) =~ s/.*\///; -f "$ARCH/$path" && system "rsync -av -c \Q$ARCH/$path\E \Qresources/arch/$base"; - "${MA_BEG}image${MA_SEP}arch/$base$MA_END" + ::special image => "arch/$base", 1; } else { - "${MA_BEG}link$MA_SEP$text$MA_SEP$link$MA_END" + ::special link => $text, $link } } @@ -82,7 +86,7 @@ level => $level, }; my $title = $_[1]->title->present ($_[0]); - $result[-1]{markup} = "$title\n\n" if length $title; + $result[-1]{markup} = "$title\n" if length $title; $title = ::flatten $title; unshift @{ $result[-1]{index} }, $title if length $title; local $level = $level + 1; $_[1]->content->present ($_[0]); @@ -158,12 +162,16 @@ push @result, { indent => $indent * 16, level => $level, - markup => "${MA_BEG}image${MA_SEP}pod/" . $_->text . $MA_END, + markup => (::special image => "pod/" . $_->text), }; } () } +sub view_begin { + () +} + sub view { my ($self, $type, $item) = @_;