lib/wparser/inline/inline.rb in wparser-0.1.2 vs lib/wparser/inline/inline.rb in wparser-0.1.3

- old
+ new

@@ -10,13 +10,16 @@ module Inline include Inlines def parse text @protected_preTag = nil - parse_lines = text.collect {|line| parse_line line} + + parse_lines = text.inject([]) do |r, line| + r << parse_line(Http.parse line) + end - Http.parse parse_lines.to_s + parse_lines.join end private # 1行ずつ処理したいメソッド郡 def parse_line line @@ -28,14 +31,14 @@ parse_line = line if @protected_preTag == nil parse_line = Heading.parse parse_line parse_line = Strong.parse parse_line - parse_line = Code.parse parse_line + parse_line = Code.parse parse_line parse_line = Italic.parse parse_line parse_line = UnderLine.parse parse_line parse_line = Deleted.parse parse_line - parse_line = Paragraph.parse parse_line + parse_line = Paragraph.parse parse_line else parse_line end end