fastreader 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fastreader might be problematic. Click here for more details.

data/lib/display.rb CHANGED
@@ -132,15 +132,11 @@ class Display
132
132
 
133
133
  doc.search('//comment()').remove
134
134
 
135
- doc.search('div') do |p|
136
- p.swap( "\n\n" + p.inner_text.gsub("\n", ' ').squeeze(' ').strip + "\n\n" )
135
+ doc.search('p, div') do |p|
136
+ p.swap( "\n\n" + p.inner_html.gsub("\n", ' ').squeeze(' ').strip + "\n\n" )
137
137
  end
138
138
 
139
- doc.search('p') do |p|
140
- p.swap( "\n\n" + p.inner_text.gsub("\n", ' ').squeeze(' ').strip + "\n\n" )
141
- end
142
-
143
- doc.search('//blockquote') do |x|
139
+ doc.search('blockquote, pre') do |x|
144
140
  # compress extra spaces
145
141
  text = x.inner_text.squeeze(' ').strip
146
142
  # collapse the spacing in the text
@@ -149,14 +145,14 @@ class Display
149
145
  x.swap("\n\n" + text + "\n\n")
150
146
  end
151
147
 
152
- doc.search('h1,h2,h3,h4') do |p|
148
+ doc.search('big, h1,h2,h3,h4') do |p|
153
149
  p.swap( "\n\n= #{p.inner_text}\n\n" )
154
150
  end
155
151
  doc.search('//img') do |img|
156
152
  img.swap( "(img)" )
157
153
  end
158
154
 
159
- doc.search('object').remove
155
+ doc.search('svg, object').remove
160
156
  doc.search('table').remove
161
157
  doc.search('script').remove
162
158
 
@@ -164,9 +160,13 @@ class Display
164
160
  p.swap( "\n" )
165
161
  end
166
162
 
167
- doc.search('i, b') do |p|
163
+ doc.search('i, b, strong, em') do |p|
168
164
  p.swap( "*#{p.inner_text}*" )
169
165
  end
166
+ doc.search('abbr') do |p|
167
+ p.swap( "+#{p.inner_text}+" )
168
+ end
169
+ #
170
170
  # anchor tags are processed after real links
171
171
  doc.search('a') do |p|
172
172
  p.swap( "#{p.inner_text}" )
@@ -11,7 +11,7 @@ module EntriesController
11
11
  @options = {}
12
12
  if (@current_feed.is_a?(VirtualFeed) || @global_search_string)
13
13
  @options[:show_feed_titles] = true
14
- @options[:feed_title] = @current_feed.title
14
+ @options[:feed_title] = @current_feed_title
15
15
  end
16
16
  if @current_feed.is_a?(VirtualFeed)
17
17
  #@options[:turn_off_flagged_color] = true
data/lib/fastreader.rb CHANGED
@@ -33,7 +33,7 @@ include FileUtils
33
33
  include ActionView::Helpers::DateHelper
34
34
 
35
35
  class Fastreader
36
- VERSION = '1.0.1'
36
+ VERSION = '1.0.2'
37
37
 
38
38
  attr_accessor :database_path
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastreader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Choi