wparser 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Manifest.txt CHANGED
@@ -11,6 +11,7 @@ lib/wparser/block/list_nonumber.rb
11
11
  lib/wparser/block/list_number.rb
12
12
  lib/wparser/block/pre.rb
13
13
  lib/wparser/util/break.rb
14
+ lib/wparser/parse.rb
14
15
  lib/wparser/cli.rb
15
16
  lib/wparser/inline/deleted.rb
16
17
  lib/wparser/inline/heading.rb
data/lib/wparser.rb CHANGED
@@ -4,7 +4,7 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  #require File.join(directory, 'wparser', 'Parser')
5
5
  require 'wparser/parser'
6
6
  module WParser
7
- VERSION = '0.1.0'
7
+ VERSION = '0.1.1'
8
8
 
9
9
  def WParser.new
10
10
  Parser.new
@@ -0,0 +1,18 @@
1
+ # ParseClassはHeadingなどの実際に置換をしているparseMethodの
2
+ # TemplateMethodです。
3
+ # 置換対象のテキストに正規表現がマッチングしなかった場合は
4
+ # textをreturnし、マッチングした場合は置換されたテキストを戻します。
5
+
6
+ class Parse
7
+ def initialize
8
+ @result = String.new
9
+ @p_flag = nil
10
+ @pre_flag = nil
11
+ @list_flag = nil
12
+ end
13
+
14
+ def self.parse text
15
+ return text if @result == nil
16
+ @result
17
+ end
18
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wparser
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - iori
@@ -79,6 +79,7 @@ files:
79
79
  - lib/wparser/block/list_number.rb
80
80
  - lib/wparser/block/pre.rb
81
81
  - lib/wparser/util/break.rb
82
+ - lib/wparser/parse.rb
82
83
  - lib/wparser/cli.rb
83
84
  - lib/wparser/inline/deleted.rb
84
85
  - lib/wparser/inline/heading.rb