Sha256: e5cae02a876d82f7df44358b9372ebc87cfd5d2a84bbe0f34f16d33edd85b281

Contents?: true

Size: 280 Bytes

Versions: 4

Compression:

Stored size: 280 Bytes

Contents

require 'wparser/parse'

module Blocks
  class Blockquote < Parse
    BLOCK_TABLE = {
      ">>"      => '<blockquote>',
      "<<"      => '</blockquote>',
    }

    def self.parse line
      @result = line.gsub(/(^>>)|(^<<)/){|s| BLOCK_TABLE[s]}
      super
    end 
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wparser-0.1.3 lib/wparser/block/blockquote.rb
wparser-0.1.2 lib/wparser/block/blockquote.rb
wparser-0.1.1 lib/wparser/block/blockquote.rb
wparser-0.1.0 lib/wparser/block/blockquote.rb