readability_js 0.0.3 → 0.0.5
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.md +6 -0
- data/README.md +2 -2
- data/lib/readability_js/extended.rb +1 -2
- data/lib/readability_js/version.rb +1 -1
- 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: 9a5faf9c156d80158ba2ee471bb3d7ec102396c3c03ca5472162211706ac74d9
|
|
4
|
+
data.tar.gz: 16a0a329c137ecfbae089501b24f4dea0cc00395d62d5bedc123c40757018e27
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f3b5aa2bb14ee235f3aad9b884cdeeb801e28ea18048d33d7a2c50921e89b33210df375e7d67607f86c33c23a0c1cfa3b82fd8420951ea5008534164eede0a8
|
|
7
|
+
data.tar.gz: ae1fe7c1decc638e7da359f16c8178a6ce8f02a2632bef7b5e3e4542bc7de17b52bba16bce4dbb70692a4db87c46728c1943f13b6134c5a0b101d458fc7baf78
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -69,7 +69,7 @@ and includes a beautified markdown version of the content.
|
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
### Query parameters
|
|
72
|
-
You can pass all parameters supported by readability, checkout the [rubydoc for more details](https://
|
|
72
|
+
You can pass all parameters supported by readability, checkout the [rubydoc for more details](https://rubydoc.info/github/magynhard/ruby-readability_js/ReadabilityJs).
|
|
73
73
|
|
|
74
74
|
Here an example with all parameters, the camelCase parameters are converted to snake_case in ruby:
|
|
75
75
|
|
|
@@ -105,7 +105,7 @@ It contains the data returned by readability, with hash keys transformed in snak
|
|
|
105
105
|
<a name="documentation"></a>
|
|
106
106
|
## Documentation
|
|
107
107
|
Check out the doc at RubyDoc:<br>
|
|
108
|
-
https://
|
|
108
|
+
https://rubydoc.info/github/magynhard/ruby-readability_js
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
As this library is only a wrapper, checkout the original readability documentation:<br>
|
|
@@ -148,7 +148,7 @@ module ReadabilityJs
|
|
|
148
148
|
# @return [String] The cleaned HTML content as a string.
|
|
149
149
|
#
|
|
150
150
|
def self.clean_up_comments(html)
|
|
151
|
-
copy = html.dup
|
|
151
|
+
copy = html.dup.to_s
|
|
152
152
|
# Turn \x3C before comment start into '<'
|
|
153
153
|
copy.gsub!(/\\x3C(?=!--)/, '<')
|
|
154
154
|
# Decode encoded comment end --> to -->
|
|
@@ -242,7 +242,6 @@ module ReadabilityJs
|
|
|
242
242
|
if h1
|
|
243
243
|
h1.add_next_sibling(Nokogiri::HTML::DocumentFragment.parse(img_tag))
|
|
244
244
|
html = doc.to_html
|
|
245
|
-
text = result['image_url'] + "\n\n" + text
|
|
246
245
|
end
|
|
247
246
|
end
|
|
248
247
|
end
|