aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/shared_html_lite.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-07-06 16:17:04 -0400
committerRalph Amissah <ralph@amissah.com>2010-07-06 16:17:04 -0400
commit1866f5d2bfc189c5f53d6e0c350b727a455c75b5 (patch)
tree1c3b3d59bffe5fda6c843be733751826e19de841 /lib/sisu/v2/shared_html_lite.rb
parentdb_import, remove monospace tag (diff)
shared_html_lite, db_import, monospace font (codeblock & monospace tag)
Diffstat (limited to 'lib/sisu/v2/shared_html_lite.rb')
-rw-r--r--lib/sisu/v2/shared_html_lite.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sisu/v2/shared_html_lite.rb b/lib/sisu/v2/shared_html_lite.rb
index bb27258c..02b4dcc2 100644
--- a/lib/sisu/v2/shared_html_lite.rb
+++ b/lib/sisu/v2/shared_html_lite.rb
@@ -147,6 +147,7 @@ module SiSU_Format_Shared
s=s.gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strke_c]}/,'-{\1}-')
s=s.gsub(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,'<sup>\1</sup>')
s=s.gsub(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,'<sub>\1</sub>')
+ s=s.gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>') # tt, kbd
s=s.gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/i,'~')
end
def markup_object(t_o)
@@ -225,6 +226,11 @@ GSUB
h={:txt =>txt,:class =>'norm',:type =>'substantive',:id =>@ocn}
tag_para(h)
end
+ def code
+ txt=markup_object(@t_o)
+ h={:txt =>"<tt>#{txt}</tt>",:class =>'code',:type =>'substantive',:id =>@ocn}
+ tag_para(h)
+ end
def indent(t)
txt=markup_object(@t_o)
h={:txt =>txt,:class =>"indent#{t}",:type =>'substantive',:id =>@ocn}