/[socialtext-import]/Pod-Simple-Wiki/lib/Pod/Simple/Wiki.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Pod-Simple-Wiki/lib/Pod/Simple/Wiki.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3 by dpavlin, Tue Nov 28 14:15:41 2006 UTC revision 4 by dpavlin, Tue Nov 28 14:17:33 2006 UTC
# Line 147  my %tags = ( Line 147  my %tags = (
147                                      '<h4>'   => "=====",                                      '<h4>'   => "=====",
148                                      '</h4>'  => "=====\n",                                      '</h4>'  => "=====\n",
149                                  },                                  },
150                    'socialtext' => {
151                                        '<b>'    => '*',
152                                        '</b>'   => '*',
153                                        '<i>'    => '_',
154                                        '</i>'   => '_',
155                                        '<tt>'   => '`',
156                                        '</tt>'  => '`',
157                                        '<pre>'  => "\n.pre\n",
158                                        '</pre>' => "\n.pre\n",
159    
160                                        '<h1>'   => "^ ",
161                                        '</h1>'  => "\n",
162                                        '<h2>'   => "^^ ",
163                                        '</h2>'  => "\n",
164                                        '<h3>'   => "^^^ ",
165                                        '</h3>'  => "\n",
166                                        '<h4>'   => "^^^^ ",
167                                        '</h4>'  => "\n",
168                                    },
169    
170  );  );
171    
172    
# Line 282  sub _indent_item { Line 302  sub _indent_item {
302          elsif ($item_type eq 'text') {          elsif ($item_type eq 'text') {
303               $self->_append(";" x $indent_level . ' ');               $self->_append(";" x $indent_level . ' ');
304          }          }
305            }
306        elsif ($self->{_format} eq 'socialtext') {
307    
308            if    ($item_type eq 'bullet') {
309                 $self->_append('*' x $indent_level . ' ');
310            }
311            elsif ($item_type eq 'number') {
312                 $self->_append('#' x $indent_level . ' ');
313            }
314            elsif ($item_type eq 'text') {
315                 $self->_append(">" x $indent_level . ' ');
316            }
317      }      }
318  }  }
319    
# Line 497  sub _end_item_text     {$_[0]->_output(" Line 529  sub _end_item_text     {$_[0]->_output("
529                          $_[0]->_output(" ; ") if $_[0]->{_format} eq 'kwiki';                          $_[0]->_output(" ; ") if $_[0]->{_format} eq 'kwiki';
530                          $_[0]->_output(":"  ) if $_[0]->{_format} eq 'usemod';                          $_[0]->_output(":"  ) if $_[0]->{_format} eq 'usemod';
531                          $_[0]->_output(": " ) if $_[0]->{_format} eq 'twiki';                          $_[0]->_output(": " ) if $_[0]->{_format} eq 'twiki';
532                          $_[0]->_output(" : ") if $_[0]->{_format} eq 'wikipedia';}                          $_[0]->_output(" : ") if $_[0]->{_format} eq 'wikipedia';
533                            $_[0]->_output("\n") if $_[0]->{_format} eq 'socialtext';}
534    
535  sub _start_over_block  {$_[0]->{_item_indent}++}  sub _start_over_block  {$_[0]->{_item_indent}++}
536  sub _end_over_block    {$_[0]->{_item_indent}--}  sub _end_over_block    {$_[0]->{_item_indent}--}

Legend:
Removed from v.3  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26