meteor 0.9.36 → 0.9.38
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 +8 -0
- data/Gemfile.lock +1 -1
- data/lib/meteor/core/kernel.rb +2 -1
- data/lib/meteor/ml/html4/parser_impl.rb +5 -8
- data/lib/meteor/ml/xhtml4/parser_impl.rb +3 -3
- data/lib/meteor/ml/xml/parser_impl.rb +4 -7
- data/lib/meteor.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9f19ba1ec59b27169b092cf733dd33ad1caf394d1bdfed7750bab164a55a86f
|
|
4
|
+
data.tar.gz: a8a45526d84143a892bd7e052815199de8815ace68a7b522eb1d6a8cbcf83e24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8feb661b6a9fed19dac6cf1fd5c650a77477fe2a72b4f326038fdb7b304d521a042ca304e75444d2fe8fdb6dfcd31f7be7df8ac9d3ce4dcda81aa3ffca4fb51e
|
|
7
|
+
data.tar.gz: c48f7bdd524d73b39e0d80a75d3a7497937a19f8ab3bfda309fe48e1dfc9358ffbc4c128db8fc98c9c55148182212fc1863be9d31246dba3adb5af327a13f8ea
|
data/ChangeLog
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
== 0.9.38 / 2026-07-08 Yasumasa Ashida <ys.ashida@gmail.com>
|
|
2
|
+
|
|
3
|
+
* Refactor Meteor::Ml::(Html4|Xhtml4|Xml)::ParserImpl
|
|
4
|
+
|
|
5
|
+
== 0.9.37 / 2026-07-08 Yasumasa Ashida <ys.ashida@gmail.com>
|
|
6
|
+
|
|
7
|
+
* Refactor Meteor::Core::Kernel
|
|
8
|
+
|
|
1
9
|
== 0.9.36 / 2026-07-08 Yasumasa Ashida <ys.ashida@gmail.com>
|
|
2
10
|
|
|
3
11
|
* Refactor Meteor::Element
|
data/Gemfile.lock
CHANGED
data/lib/meteor/core/kernel.rb
CHANGED
|
@@ -138,6 +138,7 @@ module Meteor
|
|
|
138
138
|
# initializer (イニシャライザ)
|
|
139
139
|
#
|
|
140
140
|
def initialize
|
|
141
|
+
super
|
|
141
142
|
# parent element (親要素)
|
|
142
143
|
# @parent = nil
|
|
143
144
|
|
|
@@ -168,7 +169,7 @@ module Meteor
|
|
|
168
169
|
end
|
|
169
170
|
|
|
170
171
|
#
|
|
171
|
-
#
|
|
172
|
+
# parse document (ドキュメントを解析する)
|
|
172
173
|
# @param [String] document document (ドキュメント)
|
|
173
174
|
#
|
|
174
175
|
def parse; end
|
|
@@ -8,9 +8,9 @@ module Meteor
|
|
|
8
8
|
# HTML4 parser (HTMLパーサ)
|
|
9
9
|
#
|
|
10
10
|
class ParserImpl < Meteor::Core::Kernel # rubocop:disable Metrics/ClassLength
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
|
|
11
|
+
# NEWLINE = "\r?\n|\r"
|
|
12
|
+
# NEWLINE = "\r\n|\n|\r"
|
|
13
|
+
NEWLINE = ["\r\n", "\n", "\r"].freeze
|
|
14
14
|
BR = '<br>'
|
|
15
15
|
BR_RE = BR
|
|
16
16
|
|
|
@@ -172,11 +172,8 @@ module Meteor
|
|
|
172
172
|
# analuze document , set newline (ドキュメントをパースし、改行コードをセットする)
|
|
173
173
|
#
|
|
174
174
|
def analyze_newline
|
|
175
|
-
|
|
176
|
-
if @root.document.include?(a)
|
|
177
|
-
@root.newline = a
|
|
178
|
-
# puts "kaigyo:" << @root.newline
|
|
179
|
-
end
|
|
175
|
+
NEWLINE.each do |a|
|
|
176
|
+
@root.newline = a if @root.document.include?(a)
|
|
180
177
|
end
|
|
181
178
|
end
|
|
182
179
|
|
|
@@ -8,8 +8,8 @@ module Meteor
|
|
|
8
8
|
# XHTML4 parser (XHTML4パーサ)
|
|
9
9
|
#
|
|
10
10
|
class ParserImpl < Meteor::Core::Kernel # rubocop:disable Metrics/ClassLength
|
|
11
|
-
#
|
|
12
|
-
|
|
11
|
+
# NEWLINE = "\r?\n|\r"
|
|
12
|
+
NEWLINE = ["\r\n", "\n", "\r"].freeze
|
|
13
13
|
BR = '<br/>'
|
|
14
14
|
BR_RE = '<br\\/>'
|
|
15
15
|
|
|
@@ -164,7 +164,7 @@ module Meteor
|
|
|
164
164
|
# analyze document , set newline (ドキュメントをパースし、改行コードをセットする)
|
|
165
165
|
#
|
|
166
166
|
def analyze_newline
|
|
167
|
-
|
|
167
|
+
NEWLINE.each do |a|
|
|
168
168
|
@root.newline = a if @root.document.include?(a)
|
|
169
169
|
end
|
|
170
170
|
end
|
|
@@ -8,8 +8,8 @@ module Meteor
|
|
|
8
8
|
# XML parser (XMLパーサ)
|
|
9
9
|
#
|
|
10
10
|
class ParserImpl < Meteor::Core::Kernel
|
|
11
|
-
#
|
|
12
|
-
|
|
11
|
+
# NEWLINE = "\r?\n|\r"
|
|
12
|
+
NEWLINE = ["\r\n", "\n", "\r"].freeze
|
|
13
13
|
|
|
14
14
|
TABLE_FOR_ESCAPE_ = {
|
|
15
15
|
'&' => '&',
|
|
@@ -99,11 +99,8 @@ module Meteor
|
|
|
99
99
|
# analuze document , set newline (ドキュメントをパースし、改行コードをセットする)
|
|
100
100
|
#
|
|
101
101
|
def analyze_newline
|
|
102
|
-
|
|
103
|
-
if @root.document.include?(a)
|
|
104
|
-
@root.newline = a
|
|
105
|
-
# puts "kaigyo:" << @root.newline
|
|
106
|
-
end
|
|
102
|
+
NEWLINE.each do |a|
|
|
103
|
+
@root.newline = a if @root.document.include?(a)
|
|
107
104
|
end
|
|
108
105
|
end
|
|
109
106
|
|
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.38
|
|
41
41
|
#
|
|
42
42
|
|
|
43
43
|
module Meteor
|
|
44
|
-
VERSION = '0.9.
|
|
44
|
+
VERSION = '0.9.38'
|
|
45
45
|
|
|
46
46
|
# require 'fileutils'
|
|
47
47
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: meteor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.38
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yasumasa Ashida
|
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
83
|
version: '0'
|
|
84
84
|
requirements: []
|
|
85
|
-
rubygems_version: 4.0.
|
|
85
|
+
rubygems_version: 4.0.15
|
|
86
86
|
specification_version: 4
|
|
87
87
|
summary: A lightweight (X)HTML & XML parser
|
|
88
88
|
test_files:
|