meteor 0.9.41 → 0.9.42
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.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/Gemfile.lock +1 -1
- data/lib/meteor/core/kernel.rb +1 -14
- data/lib/meteor/element.rb +22 -8
- data/lib/meteor/elements.rb +1 -1
- data/lib/meteor.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06e3af4f688641740f8ca20eccb680649355e66a6d370c5a9f09dc63ef2a5fea
|
|
4
|
+
data.tar.gz: d9a404cf2d03bc439a6b88f7aa60d39add1a7d49ed57fa46a9348339fefa75d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cce916500df8f9e7e3648d7144d3a9b68e0c4df21cd8ca70a0f5b667b8746897d5daca0fe8f741b757ec6ec052e4d768ef0646beb9d2990e9936370c646766b7
|
|
7
|
+
data.tar.gz: 6d2d1e9f403946998c2ec58123853021e8fc30adcd6602f425cbfb4a6f221c49c5ad6f55b014b9d4ccf2ce0eebf41e6670fb69721497a852605f12ed530347f0
|
data/ChangeLog
CHANGED
data/Gemfile.lock
CHANGED
data/lib/meteor/core/kernel.rb
CHANGED
|
@@ -45,8 +45,6 @@ module Meteor
|
|
|
45
45
|
RE_FIND_FOUR = Regexp.new(PATTERN_FIND_FOUR)
|
|
46
46
|
RE_FIND_FIVE = Regexp.new(PATTERN_FIND_FIVE)
|
|
47
47
|
|
|
48
|
-
RE_CHILDLESS = Regexp.new('\\A[^<>]*\\Z')
|
|
49
|
-
|
|
50
48
|
RE_GET_ATTRS_MAP = Regexp.new('([^\\s]*)="([^\"]*)"')
|
|
51
49
|
|
|
52
50
|
RE_CLEAN_ONE = Regexp.new('<!--\\s@[^<>]*\\s[^<>]*(\\s)*-->')
|
|
@@ -1947,12 +1945,9 @@ module Meteor
|
|
|
1947
1945
|
# @param [Meteor::Element] elm element (要素)
|
|
1948
1946
|
# @return [Meteor::Element] element (要素)
|
|
1949
1947
|
#
|
|
1950
|
-
def shadow(elm) # rubocop:disable Metrics/AbcSize
|
|
1948
|
+
def shadow(elm) # rubocop:disable Metrics/AbcSize
|
|
1951
1949
|
return unless elm.normal
|
|
1952
1950
|
|
|
1953
|
-
# case of normal element (内容あり要素の場合)
|
|
1954
|
-
self.childless = elm
|
|
1955
|
-
|
|
1956
1951
|
pif2 = self.class.new(self)
|
|
1957
1952
|
|
|
1958
1953
|
@elm_ = elm.clone(pif2)
|
|
@@ -1970,14 +1965,6 @@ module Meteor
|
|
|
1970
1965
|
|
|
1971
1966
|
# private :shadow
|
|
1972
1967
|
|
|
1973
|
-
def childless=(elm)
|
|
1974
|
-
@res = RE_CHILDLESS.match(elm.mixed_content)
|
|
1975
|
-
|
|
1976
|
-
elm.childless = true if @res
|
|
1977
|
-
end
|
|
1978
|
-
|
|
1979
|
-
private :childless=
|
|
1980
|
-
|
|
1981
1968
|
def match?(regex, str)
|
|
1982
1969
|
case regex
|
|
1983
1970
|
when Regexp
|
data/lib/meteor/element.rb
CHANGED
|
@@ -21,8 +21,6 @@ module Meteor
|
|
|
21
21
|
# @return [true,false] content normal flag (内容存在フラグ)
|
|
22
22
|
# @!attribute [rw] cx
|
|
23
23
|
# @return [true,false] comment extension tag flag (コメント拡張タグフラグ)
|
|
24
|
-
# @!attribute [rw] childless
|
|
25
|
-
# @return [true,false] child childless flag (子要素なしフラグ)
|
|
26
24
|
# @!attribute [rw] parser
|
|
27
25
|
# @return [Meteor::Parser] parser(パーサ)
|
|
28
26
|
# @!attribute [rw] type_value
|
|
@@ -37,7 +35,7 @@ module Meteor
|
|
|
37
35
|
# @return [true,false] deletion flag (削除フラグ)
|
|
38
36
|
#
|
|
39
37
|
class Element # rubocop:disable Metrics/ClassLength
|
|
40
|
-
attr_accessor :name, :attributes, :mixed_content, :raw_content, :pattern, :document_sync, :normal, :cx,
|
|
38
|
+
attr_accessor :name, :attributes, :mixed_content, :raw_content, :pattern, :document_sync, :normal, :cx,
|
|
41
39
|
:parser, :type_value, :usable, :origin, :copy, :removed
|
|
42
40
|
|
|
43
41
|
alias tag name
|
|
@@ -46,8 +44,7 @@ module Meteor
|
|
|
46
44
|
alias empty normal
|
|
47
45
|
alias empty= normal=
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
alias mono= childless=
|
|
47
|
+
RE_CHILDLESS = Regexp.new('\\A[^<>]*\\Z')
|
|
51
48
|
|
|
52
49
|
#
|
|
53
50
|
# initializer (イニシャライザ)
|
|
@@ -90,7 +87,6 @@ module Meteor
|
|
|
90
87
|
# @parser=nil
|
|
91
88
|
# @normal = false
|
|
92
89
|
# @cx = false
|
|
93
|
-
# @childless = false
|
|
94
90
|
# @parent = false
|
|
95
91
|
@usable = true
|
|
96
92
|
end
|
|
@@ -108,7 +104,7 @@ module Meteor
|
|
|
108
104
|
|
|
109
105
|
private :initialize_e
|
|
110
106
|
|
|
111
|
-
def initialize_two(elm, ps) # rubocop:disable Metrics/
|
|
107
|
+
def initialize_two(elm, ps) # rubocop:disable Metrics/MethodLength,Naming/MethodParameterName
|
|
112
108
|
@parser = ps
|
|
113
109
|
if normal
|
|
114
110
|
ps.element(elm)
|
|
@@ -121,7 +117,6 @@ module Meteor
|
|
|
121
117
|
@document = String.new(elm.document)
|
|
122
118
|
@normal = elm.normal
|
|
123
119
|
@cx = elm.cx
|
|
124
|
-
@childless = elm.childless
|
|
125
120
|
@origin = elm
|
|
126
121
|
# @usable = false
|
|
127
122
|
elm.copy = self
|
|
@@ -189,6 +184,25 @@ module Meteor
|
|
|
189
184
|
|
|
190
185
|
private :clone_one
|
|
191
186
|
|
|
187
|
+
#
|
|
188
|
+
# get childless flag (子要素なしフラグを取得する)
|
|
189
|
+
# @return [true,false] childless flag (子要素なしフラグ)
|
|
190
|
+
#
|
|
191
|
+
def childless
|
|
192
|
+
if @childless.nil?
|
|
193
|
+
@res = RE_CHILDLESS.match(mixed_content)
|
|
194
|
+
|
|
195
|
+
@childless = if @res
|
|
196
|
+
true
|
|
197
|
+
else
|
|
198
|
+
false
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
@childless
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
alias mono childless
|
|
205
|
+
|
|
192
206
|
#
|
|
193
207
|
# set document (ドキュメントをセットする)
|
|
194
208
|
# @param [String] doc document (ドキュメント)
|
data/lib/meteor/elements.rb
CHANGED
data/lib/meteor.rb
CHANGED
|
@@ -37,11 +37,11 @@ require 'meteor/ml/xml/parser_impl'
|
|
|
37
37
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
38
38
|
#
|
|
39
39
|
# @author Yasumasa Ashida
|
|
40
|
-
# @version 0.9.
|
|
40
|
+
# @version 0.9.42
|
|
41
41
|
#
|
|
42
42
|
|
|
43
43
|
module Meteor
|
|
44
|
-
VERSION = '0.9.
|
|
44
|
+
VERSION = '0.9.42'
|
|
45
45
|
|
|
46
46
|
# require 'fileutils'
|
|
47
47
|
|