~ubuntu-branches/ubuntu/oneiric/libhtml-wikiconverter-perl/oneiric

« back to all changes in this revision

Viewing changes to WikiConverter/Kwiki.pm

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Genannt
  • Date: 2006-01-09 20:19:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060109201912-306xp7tjdjcwejlu
Tags: 0.40-1
New Upstream Release

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
  return \%rules;
45
45
}
46
46
 
47
 
# Calculates the prefix that will be placed before each list item.
48
 
# List item include ordered and unordered list items.
49
47
sub _li_start {
50
48
  my( $self, $node, $rules ) = @_;
51
49
  my @parent_lists = $node->look_up( _tag => qr/ul|ol/ );
64
62
  my $url = $node->attr('href') || '';
65
63
  my $text = $self->get_elem_contents($node) || '';
66
64
 
67
 
  # Handle the internal links
68
65
  if( my $title = $self->get_wiki_page($url) ) {
69
66
    return $title if $self->is_camel_case( $title ) and $text eq $title;
70
67
    return "[$title]" if $text eq $title;
71
68
    return "[$text http:?$title]" if $text ne $title;
 
69
  } else {
 
70
    return $url if $text eq $url;
 
71
    return "[$text $url]";
72
72
  }
73
 
 
74
 
  # Handle the external ones
75
 
  return $url if $text eq $url;
76
 
  return "[$text $url]";
77
73
}
78
74
 
79
75
sub _image {
108
104
 
109
105
=head1 AUTHOR
110
106
 
111
 
David J. Iberri <diberri@yahoo.com>
 
107
David J. Iberri <diberri@cpan.org>
112
108
 
113
109
=head1 COPYRIGHT
114
110