HTML-WikiConverter-MoinMoin

 view release on metacpan or  search on metacpan

lib/HTML/WikiConverter/MoinMoin.pm  view on Meta::CPAN

=head1 ATTRIBUTES

In addition to the regular set of attributes recognized by the
L<HTML::WikiConverter> constructor, this dialect also accepts the
following attributes that can be passed into the C<new()>
constructor. See L<HTML::WikiConverter/ATTRIBUTES> for usage details.

=head2 enable_anchor_macro

Possible values: C<0>, C<1>. Enables C<[[Anchor(s)]]> formatting. See
L<http://moinmoin.wikiwikiweb.de/HelpOnMacros> for details.

=cut

sub attributes { {
  enable_anchor_macro => { default => 0, type => BOOLEAN }
} }

my %att2prop = (
  width => 'width',
  bgcolor => 'background-color',

lib/HTML/WikiConverter/MoinMoin.pm  view on Meta::CPAN

  my( $self, $node, $rules ) = @_;
  my $bullet = '';
  $bullet = '*'  if $node->parent->tag eq 'ul';
  $bullet = '1.' if $node->parent->tag eq 'ol';
  return "\n$bullet ";
}

sub _link {
  my( $self, $node, $rules ) = @_;

  # bug #17813 requests anchors; MoinMoin:HelpOnMacros gives new
  # "<<Anchor(name)>>" syntax for anchors and other macros (this was
  # previously "[[Anchor(name)]]" sometime prior to 2008-10-01)

  # bug #29347 requests 'id' be favored over 'name'
  my $anchor_name = $node->attr('id') || $node->attr('name');
  return sprintf( "<<Anchor(%s)>>\n", $anchor_name ) if $self->enable_anchor_macro and $anchor_name;

  my $url = $node->attr('href') || '';
  my $text = $self->get_elem_contents($node) || '';



( run in 0.502 second using v1.01-cache-2.11-cpan-49f99fa48dc )