forked from ingydotnet/wikitext-pm
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://svn.kwiki.org/kwiki/trunk/src/ingy/WikiText@326 4b3b33bc-d223-0410-9309-b363ae52eedd
- Loading branch information
ingy
committed
Feb 26, 2008
1 parent
7dafc4f
commit 3668836
Showing
2 changed files
with
24 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package WikiText::Emitter; | ||
use strict; | ||
use warnings; | ||
|
||
use base 'WikiText::Receiver'; | ||
|
||
sub init { | ||
my $self = shift; | ||
$self->{output} = ''; | ||
} | ||
|
||
sub content { | ||
my $self = shift; | ||
return $self->{output}; | ||
} | ||
|
||
sub insert { | ||
my $self = shift; | ||
my $ast = shift; | ||
$self->{output} .= $ast->{output} || ''; | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters