Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pod-Simple-Wiki CPAN distribution.

Report information
The Basics
Id: 23662
Status: open
Priority: 0/
Queue: Pod-Simple-Wiki

People
Owner: Nobody in particular
Requestors: DPAVLIN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: [patch] add SocialText wiki format
In a spirit of (unresolved at this time) patch for Trac, I'm submitting patch for SocialText wiki support. Do I also need to write tests for inclusion of this patch?
Subject: Pod-Simple-Wiki-0.05+socialtext.diff
diff -urw Pod-Simple-Wiki-0.05/lib/Pod/Simple/Wiki.pm Pod-Simple-Wiki-0.05+socialtext/lib/Pod/Simple/Wiki.pm --- Pod-Simple-Wiki-0.05/lib/Pod/Simple/Wiki.pm 2005-03-31 00:24:58.000000000 +0200 +++ Pod-Simple-Wiki-0.05+socialtext/lib/Pod/Simple/Wiki.pm 2006-11-27 17:21:19.000000000 +0100 @@ -147,6 +147,26 @@ '<h4>' => "=====", '</h4>' => "=====\n", }, + 'socialtext' => { + '<b>' => '*', + '</b>' => '*', + '<i>' => '_', + '</i>' => '_', + '<tt>' => '`', + '</tt>' => '`', + '<pre>' => "\n.pre\n", + '</pre>' => "\n.pre\n", + + '<h1>' => "^ ", + '</h1>' => "\n", + '<h2>' => "^^ ", + '</h2>' => "\n", + '<h3>' => "^^^ ", + '</h3>' => "\n", + '<h4>' => "^^^^ ", + '</h4>' => "\n", + }, + ); @@ -283,6 +303,18 @@ $self->_append(";" x $indent_level . ' '); } } + elsif ($self->{_format} eq 'socialtext') { + + if ($item_type eq 'bullet') { + $self->_append('*' x $indent_level . ' '); + } + elsif ($item_type eq 'number') { + $self->_append('#' x $indent_level . ' '); + } + elsif ($item_type eq 'text') { + $self->_append(">" x $indent_level . ' '); + } + } } @@ -497,7 +529,8 @@ $_[0]->_output(" ; ") if $_[0]->{_format} eq 'kwiki'; $_[0]->_output(":" ) if $_[0]->{_format} eq 'usemod'; $_[0]->_output(": " ) if $_[0]->{_format} eq 'twiki'; - $_[0]->_output(" : ") if $_[0]->{_format} eq 'wikipedia';} + $_[0]->_output(" : ") if $_[0]->{_format} eq 'wikipedia'; + $_[0]->_output("\n") if $_[0]->{_format} eq 'socialtext';} sub _start_over_block {$_[0]->{_item_indent}++} sub _end_over_block {$_[0]->{_item_indent}--}
From: jmcnamara [...] cpan.org
On Mon Nov 27 11:29:08 2006, DPAVLIN wrote: Show quoted text
> In a spirit of (unresolved at this time) patch for Trac, I'm submitting > patch for SocialText wiki support. > > Do I also need to write tests for inclusion of this patch?
Hi, Thanks for that. It isn't necessary to write the tests. I can do that. However, I am more than a little busy at the moment so it will take me a while to get it to CPAN. John. --