diff options
author | murphy <murphy@rubychan.de> | 2009-06-20 16:14:07 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2009-06-20 16:14:07 +0000 |
commit | d2a880f331747a0764ebef408f2e2ab556d5d954 (patch) | |
tree | a746a02d994328a7ac0b7893557cf109c826a0a5 /lib/coderay/encoders/text.rb | |
parent | 8283feed20943a6b7863a38bcd8f2266310c91c3 (diff) | |
download | coderay-d2a880f331747a0764ebef408f2e2ab556d5d954.tar.gz |
* Improved implementation of Encoder *token callbacks.
* Documentation for these methods.
* Added two new encoders: CommentFilter < TokenFilter.
* Simplified Text encoder.
* Code cleanup in HTML encoder subclasses.
Diffstat (limited to 'lib/coderay/encoders/text.rb')
-rw-r--r-- | lib/coderay/encoders/text.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/coderay/encoders/text.rb b/lib/coderay/encoders/text.rb index 14282ac..161ee67 100644 --- a/lib/coderay/encoders/text.rb +++ b/lib/coderay/encoders/text.rb @@ -14,16 +14,16 @@ module Encoders protected def setup options - @out = '' + super @sep = options[:separator] end - def token text, kind - @out << text + @sep if text.is_a? ::String + def text_token text, kind + text + @sep end def finish options - @out.chomp @sep + super.chomp @sep end end |