aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/epub_tune.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-12-12 14:58:58 -0500
committerRalph Amissah <ralph@amissah.com>2012-12-12 14:58:58 -0500
commit1beb5aa3c376dbef89bc33024216650529ef7262 (patch)
tree1682500089c14fd49bcf52a3a001e291fadd5f75 /lib/sisu/v3/epub_tune.rb
parentdebian/changelog (3.3.2-1) (diff)
parentv3: 3.3.3 version & changelog, dates touched (diff)
Merge tag 'sisu_3.3.3' into debian/sid
Diffstat (limited to 'lib/sisu/v3/epub_tune.rb')
-rw-r--r--lib/sisu/v3/epub_tune.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sisu/v3/epub_tune.rb b/lib/sisu/v3/epub_tune.rb
index 3a5669c6..1362815e 100644
--- a/lib/sisu/v3/epub_tune.rb
+++ b/lib/sisu/v3/epub_tune.rb
@@ -96,7 +96,7 @@ module SiSU_EPUB_Tune
end
def clean
html=@html
- str=if html.class==String
+ str=if html.is_a?(String)
html
else html.obj
end
@@ -238,7 +238,7 @@ module SiSU_EPUB_Tune
gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'<del>\1</del>').
gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>'). # tt, kbd
gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,'').
- gsub(/^#{Mx[:gl_bullet]}/m,'●&nbsp;&nbsp;').
+ gsub(/#{Mx[:gl_bullet]}/m,'●&nbsp;&nbsp;').
gsub(/#{Mx[:nbsp]}/,'&nbsp;').
gsub(/<(p|br)>/,'<\1 />')
dob.obj=SiSU_EPUB_Tune::CleanXHTML.new(dob.obj).clean