aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-07-06 14:43:34 -0400
committerRalph Amissah <ralph@amissah.com>2010-07-06 14:43:34 -0400
commit839fa947b3b1d61e375adef34c1211916238235e (patch)
tree9b7516c47a07f875ef1cac663f0e7289fb300389 /lib
parenthtml, monospace font (codeblock & monospace tag) (diff)
epub, monospace font (codeblock & monospace tag)
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/epub_format.rb5
-rw-r--r--lib/sisu/v2/epub_tune.rb1
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/sisu/v2/epub_format.rb b/lib/sisu/v2/epub_format.rb
index 498912a3..6bbbd668 100644
--- a/lib/sisu/v2/epub_format.rb
+++ b/lib/sisu/v2/epub_format.rb
@@ -398,6 +398,11 @@ module SiSU_EPUB_Format
background: #880000;
}
+ tt {
+ font-family: inconsolata, andale mono, courier new, courier, monospace;
+ background-color: #eeeeee;
+ }
+
label.ocn {
width: 2%;
float: right;
diff --git a/lib/sisu/v2/epub_tune.rb b/lib/sisu/v2/epub_tune.rb
index 035a453b..5da82392 100644
--- a/lib/sisu/v2/epub_tune.rb
+++ b/lib/sisu/v2/epub_tune.rb
@@ -244,6 +244,7 @@ module SiSU_EPUB_Tune
dob.obj.gsub!(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'<ins>\1</ins>')
dob.obj.gsub!(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'<cite>\1</cite>')
dob.obj.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'<del>\1</del>')
+ dob.obj.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>') # tt, kbd
dob.obj.gsub!(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,'')
dob.obj.gsub!(/^#{Mx[:gl_bullet]}/m,'●&nbsp;&nbsp;')
dob.obj.gsub!(/#{Mx[:nbsp]}/,'&nbsp;')