busk-ruby-readability 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/readability.rb +5 -1
- data/ruby-readability.gemspec +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/lib/readability.rb
CHANGED
@@ -58,7 +58,11 @@ module Readability
|
|
58
58
|
article = apply_custom_rule if has_special_rule?
|
59
59
|
|
60
60
|
if article && remove_unlikely_candidates
|
61
|
-
|
61
|
+
content = article.to_html.gsub(/[\r\n\f]+/, "\n" ).gsub(/[\t ]+/, " ").gsub(/ /, " ")
|
62
|
+
if rules[@base_uri].try(:encoding) && rules[@base_uri].encoding == 'ISO-8859-1'
|
63
|
+
return convert_to_utf8(content)
|
64
|
+
end
|
65
|
+
return content
|
62
66
|
else
|
63
67
|
remove_unlikely_candidates! if remove_unlikely_candidates
|
64
68
|
transform_misused_divs_into_paragraphs!
|
data/ruby-readability.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.authors = ["Fabio Mont Alegre", "Rodrigo Flores"]
|
3
3
|
s.email = "it-team@busk.com"
|
4
4
|
s.homepage = "http://github.com/busk/ruby-readability"
|
5
|
-
s.version = "1.2.
|
5
|
+
s.version = "1.2.5"
|
6
6
|
s.name = "busk-ruby-readability"
|
7
7
|
s.summary = "A rewrite of original ruby-readability"
|
8
8
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: busk-ruby-readability
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 5
|
10
|
+
version: 1.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Fabio Mont Alegre
|