meteor 0.9.20 → 0.9.21

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 634ddb57832e251c0d8dfeb25a124c0c92046f296fb31c8cb4c375ecf841ee27
4
- data.tar.gz: 7f553a1b7ac314cca77e92fd45d1f541636590aebead0a687058ee450efed8de
3
+ metadata.gz: 26f1f916c420b56e221c808cbd966f43af6c89c4e49485162850bd263a48e8b0
4
+ data.tar.gz: 376bad56c8afbc0292267ecae987138ceb01fb95620ce1bb37c23a59a7104831
5
5
  SHA512:
6
- metadata.gz: 44091d7eb8d9bf3abea743b3543b60cc0f705f470927a0386c4598779268ecad39cee285ff856d117cbf4cdff5f48e945609c0ee2afa6828c7e6be6026ea740f
7
- data.tar.gz: ede1106a3c620bd3a6031637f3acfc8d5a3c7e86bae7b85e75324bf36ce539a0fff939135b9857ebdb7b8fb8cd422b0c0383d7f38b28aec55a3d085b8b81d8cd
6
+ metadata.gz: 99db703f1582e1caaa7dcc3777c59248c88f6b0d743162754938235ea08283df2b947ed0d5d42c2988caf4d1f7eca4123939dc221b48221528f80fc63529b57f
7
+ data.tar.gz: f74e0197d2246b8c70491d876f8c9b68c92fffa05baade469517e40678096163935ff2e0b53dd05bcaf4ff8c12a60b47202bd0b299eb7014640df0e3143d2bfc
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.9.21 / 2026-06-20 Yasumasa Ashida <ys.ashida@gmail.com>
2
+
3
+ * Refactoring
4
+
1
5
  == 0.9.20 / 2026-06-20 Yasumasa Ashida <ys.ashida@gmail.com>
2
6
 
3
7
  * Refactoring
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meteor (0.9.20)
4
+ meteor (0.9.21)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -323,7 +323,7 @@ module Meteor
323
323
  # document (全体)
324
324
  @elm_.document = @res[0]
325
325
  end
326
- # search pattern of content-rich element (内容あり要素検索用パターン)
326
+ # content-rich element search pattern (内容あり要素検索用パターン)
327
327
  # @pattern_cc = String.new('') << "<" << @_name << '(?:|\\s[^<>]*)>((?!(' << @_name
328
328
  # @pattern_cc << '[^<>]*>)).)*<\\/' << @_name << '>'
329
329
  @pattern_cc = "<#{@_name}(|\\s[^<>]*)>(((?!(#{@_name}[^<>]*>)).)*)<\\/#{@_name}>"
@@ -441,15 +441,15 @@ module Meteor
441
441
  # puts @res.captures.length
442
442
  case @res.captures.length
443
443
  when FOUR
444
- # 要素
444
+ # element (要素)
445
445
  @elm_ = Meteor::Element.new(name)
446
- # 属性
446
+ # attribute (属性)
447
447
  @elm_.attributes = @res[1]
448
- # 内容
448
+ # content (内容)
449
449
  @elm_.mixed_content = @res[2]
450
- # 全体
450
+ # document (全体)
451
451
  @elm_.document = @res[0]
452
- # 内容あり要素検索用パターン
452
+ # content-rich element search pattern (内容あり要素検索用パターン)
453
453
  # @pattern_cc = String.new('')<< "<" << @_name << '\\s[^<>]*' << @_attr_name << '="'
454
454
  # @pattern_cc << @_attr_value << '"[^<>]*>((?!(' << @_name
455
455
  # @pattern_cc << '[^<>]*>)).)*<\\/' << @_name << '>'
@@ -469,7 +469,7 @@ module Meteor
469
469
  @elm_.mixed_content = @res[3]
470
470
  # document (全体)
471
471
  @elm_.document = @res[0]
472
- # search pattern of content-rich element (内容あり要素検索用パターン)
472
+ # content-rich element search pattern (内容あり要素検索用パターン)
473
473
  # @pattern_cc = String.new('')<< "<" << @_name << '\\s[^<>]*' << @_attr_name << '="'
474
474
  # @pattern_cc << @_attr_value << '"[^<>]*>((?!(' << @_name
475
475
  # @pattern_cc << '[^<>]*>)).)*<\\/' << @_name << '>'
@@ -497,7 +497,7 @@ module Meteor
497
497
  end
498
498
  # document (全体)
499
499
  @elm_.document = @res[0]
500
- # search pattern of content-rich element (内容あり要素検索用パターン)
500
+ # content-rich element search pattern (内容あり要素検索用パターン)
501
501
  @elm_.pattern = @pattern_cc
502
502
 
503
503
  @elm_.empty = true
@@ -942,7 +942,7 @@ module Meteor
942
942
  @elm_.mixed_content = @res[3]
943
943
  # document (全体)
944
944
  @elm_.document = @res[0]
945
- # search pattern of content-rich element (要素ありタグ検索用パターン)
945
+ # content-rich element search pattern (要素ありタグ検索用パターン)
946
946
  @elm_.pattern = @pattern_cc
947
947
 
948
948
  @elm_.empty = true
@@ -2069,7 +2069,6 @@ module Meteor
2069
2069
  else
2070
2070
  reflect
2071
2071
  @element_cache.clear
2072
- # フック判定が"false"の場合
2073
2072
  clean
2074
2073
  end
2075
2074
  end
@@ -76,10 +76,10 @@ module Meteor
76
76
  # end
77
77
 
78
78
  ##
79
- ## パターンを取得する
80
- ## @param [String] regex 正規表現
81
- ## @param [Integer] option オプション
82
- ## @return [Regexp] パターン
79
+ ## get pattern (パターンを取得する)
80
+ ## @param [String] regex (正規表現)
81
+ ## @param [Integer] option (オプション)
82
+ ## @return [Regexp] psttern (パターン)
83
83
  ##
84
84
  # def self.get_2(regex, option)
85
85
  # ## pattern = @@regex_cache[regex]
@@ -52,7 +52,6 @@ module Meteor
52
52
  # @@pattern_true = Regexp.new("true")
53
53
  # @@pattern_false = Regexp.new("false")
54
54
 
55
-
56
55
  GET_ATTRS_MAP2 = "\\s(disabled|readonly|checked|selected|multiple)"
57
56
 
58
57
  @@pattern_selected_m = Regexp.new(SELECTED_M)
@@ -234,7 +233,7 @@ module Meteor
234
233
  @elm_ = nil
235
234
  end
236
235
  else
237
- # search pattern of content-rich element (内容あり要素検索用パターン()
236
+ # content-rich element search pattern (内容あり要素検索用パターン()
238
237
  # @pattern_cc = String.new('') << "<" << @_name << '(|\\s[^<>]*)>(((?!(' << @_name
239
238
  # @pattern_cc << '[^<>]*>)).)*)<\\/' << @_name << '>'
240
239
  @pattern_cc = "<#{@_name}(|\\s[^<>]*)>(((?!(#{tag}[^<>]*>)).)*)<\\/#{@_name}>"
@@ -308,7 +307,7 @@ module Meteor
308
307
  @elm_ = nil
309
308
  end
310
309
  else
311
- # search pattern of content-rich element (内容あり要素検索パターン)
310
+ # content-rich element search pattern (内容あり要素検索パターン)
312
311
  # @pattern_cc = String.new('') << "<" << @_name << '(\\s[^<>]*' << @_attr_name << '="'
313
312
  # @pattern_cc << @_attr_value << '"[^<>]*)>(((?!(' << @_name
314
313
  # @pattern_cc << '[^<>]*>)).)*)<\\/' << @_name << '>'
@@ -387,7 +386,7 @@ module Meteor
387
386
  def element_5(name, attr_name1, attr_value1, attr_name2, attr_value2)
388
387
  quote_element_5(name, attr_name1, attr_value1, attr_name2, attr_value2)
389
388
 
390
- # 空要素の場合(<->内容あり要素の場合)
389
+ # case of void element (空要素の場合(<->内容あり要素の場合))
391
390
  if is_match(@@match_tag, name)
392
391
  # void element search pattern (空要素検索パターン)
393
392
  # @pattern_cc = String.new('') << "<" << @_name << '(\\s[^<>]*(?:' << @_attr_name1 << '="'
@@ -415,7 +414,7 @@ module Meteor
415
414
  @elm_ = nil
416
415
  end
417
416
  else
418
- # search pattern of content-rich element (内容あり要素検索パターン)
417
+ # content-rich element search pattern (内容あり要素検索パターン)
419
418
  # @pattern_cc = String.new('') << "<" << @_name << '(\\s[^<>]*(?:' << @_attr_name1 << '="'
420
419
  # @pattern_cc << @_attr_value1 << '"[^<>]*' << @_attr_name2 << '="'
421
420
  # @pattern_cc << @_attr_value2 << '"|' << @_attr_name2 << '="'
@@ -693,19 +692,19 @@ module Meteor
693
692
 
694
693
  private :unescape
695
694
 
696
- def br_to_kaigyo(content)
695
+ def br_to_newline(content)
697
696
  if (elm.cx || !is_match(@@match_tag_2, elm.name)) && content.include?(BR)
698
697
  # 「<br>」->「¥r?¥n」
699
698
  content.gsub!(@@pattern_br_2, @root.kaigyo_code)
700
699
  end
701
700
  end
702
701
 
703
- private :br_to_kaigyo
702
+ private :br_to_newline
704
703
 
705
704
  def unescape_content(content, elm)
706
705
  content_ = unescape(content)
707
706
 
708
- br_to_kaigyo(content_)
707
+ br_to_newline(content_)
709
708
 
710
709
  content_
711
710
  end
@@ -8,13 +8,12 @@ module Meteor
8
8
  # XHTML4 parser (XHTML4パーサ)
9
9
  #
10
10
  class ParserImpl < Meteor::Core::Kernel
11
-
12
11
  # KAIGYO_CODE = "\r?\n|\r"
13
12
  KAIGYO_CODE = ["\r\n", "\n", "\r"]
14
13
  BR = "<br/>"
15
14
 
16
15
  # @@match_tag_2 = "textarea|option|pre"
17
- #[Array] 改行を<br/>に変換する必要のない要素
16
+ #[Array] elements where line breaks do not need to be converted to <br> (改行を<br/>に変換する必要のない要素)
18
17
  @@match_tag_2 = ["textarea", "option", "pre"]
19
18
 
20
19
  #[Array] boolean attributes (論理値で指定する属性)
@@ -386,7 +385,7 @@ module Meteor
386
385
 
387
386
  private :unescape
388
387
 
389
- def br_to_kaigyo(content)
388
+ def br_to_newline(content)
390
389
  if (elm.cx || !is_match(@@match_tag_2, elm.name)) && content.include?(BR)
391
390
  # 「<br>」->「¥r?¥n」
392
391
  content.gsub!(@@pattern_br_2, @root.kaigyo_code)
@@ -396,7 +395,7 @@ module Meteor
396
395
  def unescape_content(content, elm)
397
396
  content_ = unescape(content)
398
397
 
399
- br_to_kaigyo(content_)
398
+ br_to_newline(content_)
400
399
 
401
400
  content_
402
401
  end
@@ -65,7 +65,7 @@ module Meteor
65
65
  private :initialize_0
66
66
 
67
67
  #
68
- # イニシャライザ
68
+ # initializer (イニシャライザ)
69
69
  # @param [String] root root directory (基準ディレクトリ)
70
70
  #
71
71
  def initialize_1(root)
@@ -75,7 +75,7 @@ module Meteor
75
75
  private :initialize_1
76
76
 
77
77
  #
78
- # イニシャライザ
78
+ # initializer (イニシャライザ)
79
79
  # @param [String] root root directory (基準ディレクトリ)
80
80
  # @param [String] enc default character encoding (デフォルト文字エンコーディング)
81
81
  #
@@ -88,7 +88,7 @@ module Meteor
88
88
  private :initialize_2
89
89
 
90
90
  #
91
- # イニシャライザ
91
+ # initializer (イニシャライザ)
92
92
  # @param [Integer,Symbol] type default type of parser (デフォルトのパーサ・タイプ)
93
93
  # @param [String] root root directory (基準ディレクトリ)
94
94
  # @param [String] enc default character encoding (デフォルト文字エンコーディング)
data/lib/meteor.rb CHANGED
@@ -36,11 +36,11 @@ require "meteor/ml/xml/parser_impl"
36
36
  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
37
37
  #
38
38
  # @author Yasumasa Ashida
39
- # @version 0.9.20
39
+ # @version 0.9.21
40
40
  #
41
41
 
42
42
  module Meteor
43
- VERSION = "0.9.20"
43
+ VERSION = "0.9.21"
44
44
 
45
45
  # require 'fileutils'
46
46
 
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.20
4
+ version: 0.9.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasumasa Ashida