js_regex 1.0.7 → 1.0.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9285eb890f35a4088e8687054f54fc6355c187cc
|
4
|
+
data.tar.gz: 6d8507eb2f1f214e78f5ff1e737a21b13717f093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d3abdb39f18b9de007eddf174722f4e8cc7fa34b3bd93062c61fde7995d526562f7c783b06b9ce99f7fdfab0d097d6cfc558171b4c9ce9bf2a8887459b49926
|
7
|
+
data.tar.gz: 626f7deb5c26f0100fd29904bcae4d25a57c12258f92c33b1bceab1db00f5d5904f635158a351d45efd13ab3a847a59cfff8e0afe02c26f74b18db25988e61ac
|
@@ -18,17 +18,14 @@ class JsRegex
|
|
18
18
|
self.start_index = start_index
|
19
19
|
self.end_index = end_index
|
20
20
|
|
21
|
-
|
21
|
+
result = convert_data
|
22
|
+
target.source << (context.valid? ? result : '')
|
22
23
|
end
|
23
24
|
|
24
25
|
private
|
25
26
|
|
26
27
|
attr_accessor :token_class, :subtype, :data, :start_index, :end_index
|
27
28
|
|
28
|
-
def convert_data
|
29
|
-
fail NotImplementedError
|
30
|
-
end
|
31
|
-
|
32
29
|
def pass_through
|
33
30
|
data
|
34
31
|
end
|
@@ -49,15 +49,13 @@ class JsRegex
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def close_group
|
52
|
+
context.group_level -= 1
|
52
53
|
if context.negative_lookbehind
|
53
54
|
close_negative_lookbehind
|
55
|
+
elsif end_of_atomic_group?
|
56
|
+
close_atomic_group
|
54
57
|
else
|
55
|
-
|
56
|
-
if end_of_atomic_group?
|
57
|
-
close_atomic_group
|
58
|
-
else
|
59
|
-
')'
|
60
|
-
end
|
58
|
+
')'
|
61
59
|
end
|
62
60
|
end
|
63
61
|
|
@@ -73,7 +71,7 @@ class JsRegex
|
|
73
71
|
|
74
72
|
def close_atomic_group
|
75
73
|
context.group_level_for_backreference = nil
|
76
|
-
#
|
74
|
+
# the empty passive group (?:) is appended in case literal digits follow
|
77
75
|
"))\\#{context.group_number_for_backreference}(?:)"
|
78
76
|
end
|
79
77
|
end
|
@@ -17,11 +17,8 @@ class JsRegex
|
|
17
17
|
return nil unless property_string
|
18
18
|
if property_string.start_with?('[^')
|
19
19
|
property_string.sub('[^', '[')
|
20
|
-
elsif property_string.start_with?('[')
|
21
|
-
property_string.sub('[', '[^')
|
22
20
|
else
|
23
|
-
|
24
|
-
property_string.swapcase
|
21
|
+
property_string.sub('[', '[^')
|
25
22
|
end
|
26
23
|
end
|
27
24
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js_regex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janosch Müller
|
@@ -38,6 +38,34 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.4'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.4'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.4'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.3'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: therubyracer
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|