Sha256: 2d27aed3f2780276cc02b86bbd23c27951e350295cea0ae4e6f2b29ffea6bfee
Contents?: true
Size: 797 Bytes
Versions: 3
Compression:
Stored size: 797 Bytes
Contents
require 'wparser/block/pre' require 'wparser/block/blockquote' require 'wparser/block/list_number' require 'wparser/block/list_nonumber' module Block include Blocks def parse text @protected_preTag = nil parse_text = text.collect{|line| parse_line line} end private def parse_line line parse_line = line parse_line = Pre.parse parse_line if parse_line =~ /^<pre.*>/ @protected_preTag = true elsif parse_line =~ /<\/pre>/ @protected_preTag = nil end #puts @protected_preTag if @protected_preTag == nil parse_line = Blockquote.parse parse_line parse_line = List_number.parse parse_line parse_line = List_nonumber.parse parse_line else parse_line end end module_function :parse, :parse_line end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wparser-0.1.2 | lib/wparser/block/block.rb |
wparser-0.1.1 | lib/wparser/block/block.rb |
wparser-0.1.0 | lib/wparser/block/block.rb |