lib/wparser/parser.rb in wparser-0.0.2 vs lib/wparser/parser.rb in wparser-0.1.0
- old
+ new
@@ -1,14 +1,18 @@
-require 'wparser/break'
+require 'wparser/util/break'
require 'wparser/inline/inline'
require 'wparser/block/block'
class Parser
def parse text
- text = Break.parse(text)
- text = Inline.parse(text)
- text = Block.parse(text)
+ parse_all text
+ end
- #html = text.to_html
- text
+ private
+ def parse_all text
+ parse_text = text
+
+ parse_text = Break.parse parse_text
+ parse_text = Block.parse parse_text
+ parse_text = Inline.parse parse_text # <p>の為にblockよりも後に!
end
end