dq-readability 1.0.3 → 1.0.4
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 +8 -8
- data/dq-readability.gemspec +1 -1
- data/lib/dq-readability.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWRhYWQ4YjNmMzVkOTAxYzgwNTI0NzExZWFkYzYyOTJmYzZlZWQyNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDliZTE4MzE2NTVhNTliNDlkMTdkMDg1ZDNmMzc4MDljNjU3OTZhNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWZlNTMwZjNmN2U3MzUxZjU4MDYyMzQ1ODAxNGY4MmUyMTVlMzI0YzJmODA2
|
10
|
+
NDZmZjVhOTNlZTAxOWI0NTRiN2JmODZlNmQyZTEwYzYwYjIzNDY5NGUxYjQ0
|
11
|
+
YTg1ZjYyYWYwMzQ2YzYyNjEwNTRlNTcxNWI5YjFjYmUxZWM5NDY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDE3YTE0YmQzMjFjOWYwMTUwNDlmMTFjMGNkN2U4N2VmMzIyODA1MGEyMjFh
|
14
|
+
ODE3OTYyYjEwOTllZDIwZWE0NTIyY2YzZDcxOTg3NTZlYTk5NDU5Njk2YmJl
|
15
|
+
ZTRjY2JmZGE2MzYzNzhmNmI5NDU2ZGE4OWNlODlhNWNkMTU3ZDg=
|
data/dq-readability.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "dq-readability"
|
6
|
-
s.version = '1.0.
|
6
|
+
s.version = '1.0.4'
|
7
7
|
s.authors = ["Prateek Papriwal"]
|
8
8
|
s.email = ["papriwalprateek@gmail.com"]
|
9
9
|
s.homepage = "http://github.com/DaQwest/dq-readability"
|
data/lib/dq-readability.rb
CHANGED
@@ -538,7 +538,15 @@ module DQReadability
|
|
538
538
|
html = node.serialize(:save_with => save_opts)
|
539
539
|
|
540
540
|
# Get rid of duplicate whitespace
|
541
|
-
|
541
|
+
html = "<head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'></head>" + "\n" + html.gsub(/[\r\n\f]+/, "\n" )
|
542
|
+
|
543
|
+
|
544
|
+
# get rid of incompitable characters
|
545
|
+
if html.encode('utf-8').include?('Â')
|
546
|
+
html = html.encode('utf-8').gsub('Â',' ')
|
547
|
+
end
|
548
|
+
|
549
|
+
return html
|
542
550
|
end
|
543
551
|
|
544
552
|
def clean_conditionally(node, candidates, selector)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dq-readability
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Prateek Papriwal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|