zetaben-Html2Feedbooks 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/feedbooks.rb +4 -2
  2. metadata +1 -1
data/lib/feedbooks.rb CHANGED
@@ -104,14 +104,16 @@ module HTML2FB
104
104
 
105
105
  class Text
106
106
  def to_feedbooks(conf,path=nil)
107
- doc=Hpricot('<div xmlns:xhtml="http://www.w3.org/1999/xhtml">'+to_html+'</div>')
107
+ stxt=to_html
108
+ return unless stxt.strip.size > 0
109
+ doc=Hpricot('<div xmlns:xhtml="http://www.w3.org/1999/xhtml">'+stxt+'</div>')
108
110
  doc.traverse_all_element do |e|
109
111
  unless e.is_a?Hpricot::Text
110
112
  e.stag.name='xhtml:'+e.stag.name
111
113
  e.etag.name='xhtml:'+e.etag.name unless e.etag.nil?
112
114
  end
113
115
  end
114
- FBPost.push(conf,'',doc.to_html,"Text",path)
116
+ FBPost.push(conf,'',doc.to_html,"Text",path)
115
117
  end
116
118
  end
117
119
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zetaben-Html2Feedbooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoit Larroque