nokolexbor 0.6.0-x64-mingw32 → 0.6.2-x64-mingw32
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/lib/nokolexbor/2.6/nokolexbor.so +0 -0
- data/lib/nokolexbor/2.7/nokolexbor.so +0 -0
- data/lib/nokolexbor/3.0/nokolexbor.so +0 -0
- data/lib/nokolexbor/document.rb +20 -0
- data/lib/nokolexbor/version.rb +1 -1
- 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: 0130264e02fed10a9f7a1515891c0fe6c7a066dbcf6503dcf3a60ef4b8aff234
|
4
|
+
data.tar.gz: 5eb069ae39604354647bebc2c1872c63e2f783c61fa8f6421b3fe43642550bce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31f9da00e988c129df6d4a49a02c94dc4e1b638a9e8914ad916b1a8b62741ef121f5a53315095a8e40ac8992122ca32dbe8be666c92228db472ac7fd204c842c
|
7
|
+
data.tar.gz: 0ca61851969e92e4a80bea462ac7eb7c0966670a56bbbae02a3ab2532b90b56e005d09bde1f79a4c30bb7c91692e6c043d1c65813a268f28fd7f18ec690b0f41
|
Binary file
|
Binary file
|
Binary file
|
data/lib/nokolexbor/document.rb
CHANGED
@@ -141,6 +141,26 @@ module Nokolexbor
|
|
141
141
|
end
|
142
142
|
end
|
143
143
|
|
144
|
+
# Parse HTML into a {Document}.
|
145
|
+
#
|
146
|
+
# @param string_or_io [String, #read]
|
147
|
+
# The HTML to be parsed. It may be a String, or any object that
|
148
|
+
# responds to #read such as an IO, or StringIO.
|
149
|
+
#
|
150
|
+
# @return [Document]
|
151
|
+
def self.parse(string_or_io)
|
152
|
+
html = string_or_io
|
153
|
+
if string_or_io.respond_to?(:read)
|
154
|
+
html = string_or_io.read
|
155
|
+
end
|
156
|
+
|
157
|
+
if html.respond_to?(:encoding) && html.encoding != Encoding::UTF_8
|
158
|
+
html = html.encode(Encoding::UTF_8, invalid: :replace, undef: :replace)
|
159
|
+
end
|
160
|
+
|
161
|
+
parse_native(html)
|
162
|
+
end
|
163
|
+
|
144
164
|
private
|
145
165
|
|
146
166
|
IMPLIED_XPATH_CONTEXTS = ["//"].freeze # :nodoc:
|
data/lib/nokolexbor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokolexbor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Yicheng Zhou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|