aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/html_tune.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/html_tune.rb')
-rw-r--r--lib/sisu/v5/html_tune.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/sisu/v5/html_tune.rb b/lib/sisu/v5/html_tune.rb
index 026a1177..7cd2a920 100644
--- a/lib/sisu/v5/html_tune.rb
+++ b/lib/sisu/v5/html_tune.rb
@@ -61,11 +61,12 @@ require_relative 'dp' # dp.rb
module SiSU_HTML_Tune
require_relative 'se' # se.rb
include SiSU_Env; include SiSU_Screen
+ require_relative 'html_parts' # html_parts.rb
require_relative 'html_format' # html_format.rb #watch
@@line_mode=''
@@endnote_array=[]
@@endnote_call_counter=1
- @@table_align='<table summary='' width="96%" border="0" bgcolor="white" cellpadding="0" col="3">
+ @@table_align='<table summary='' width="96%" border="0" cellpadding="0" col="3">
<tr ...><td width="2%" align="right">
&nbsp\;</td>
<td width="94%" valign="top" align="justify">'
@@ -119,16 +120,15 @@ module SiSU_HTML_Tune
end
str=str.gsub(/#{Mx[:gl_o]}(#[0-9]{3})#{Mx[:gl_c]}/u,'&\1;').
gsub(/#{Mx[:gl_o]}#([a-z]{2,4})#{Mx[:gl_c]}/u,'&\1;').
- gsub(/[\\]{2}/m,'<br />')
+ gsub(/[\\]{2}/m,'<br>')
end
end
class Tune
+ include SiSU_Parts_HTML
def initialize(data,md)
@data,@md=data,md
- @vz=SiSU_Viz::Defaults.new
@sys=SiSU_Env::SystemCall.new
@env=SiSU_Env::InfoEnv.new(@md.fns,@md)
- @brace_url=SiSU_Viz::Defaults.new.url_decoration
end
def songsheet
begin
@@ -187,7 +187,7 @@ module SiSU_HTML_Tune
w=%{width="#{w}"} if w
h=%{height="#{h}"} if h
c=m[/"(.+?)"/m,1]
- caption=%{<br /><p class="caption">#{c}</p>} if c
+ caption=%{<br><p class="caption">#{c}</p>} if c
png=m.scan(/\S+/)[0]
image_path=@md.file.output_path.html_seg.rel_image
#image_path=(@md.fns =~/\.-ss[tm]$/) \
@@ -230,13 +230,13 @@ module SiSU_HTML_Tune
dob.obj=dob.obj.gsub(/\<:ad\s+(\S+)?\s+(\S+\.png)\s+(.+)?\;\s+(.+)?\;\s*\>/,
%{\n<center><a href="\\1" target="_top"><img src="#{@env.url.images_local}/\\2" alt="\\3"></a></center>\n})
end
- dob.obj=dob.obj.gsub(/!pick/,%{<img border="0" height="15" width="15" src="#{@env.url.images}/#{@vz.icon_choice}" alt="stellar">}).
- gsub(/!new/,%{&nbsp;<img border="0" height="15" width="15" src="#{@env.url.images}/#{@vz.icon_new}" alt="new">}).
+ dob.obj=dob.obj.gsub(/!pick/,%{<img border="0" height="15" width="15" src="#{@env.url.images}/#{the_icon.i_choice}" alt="stellar">}).
+ gsub(/!new/,%{&nbsp;<img border="0" height="15" width="15" src="#{@env.url.images}/#{the_icon.i_new}" alt="new">}).
gsub(/<:h(.{1,7}?)>/,'<a href="#h\1">\1</a>').
gsub(/<:to(\d{1,7}?)>/,'<a href="#to\1">to&nbsp;{&nbsp;\1&nbsp;}</a> ').
gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'<a href="\1" target="_top">\1</a>'). #http ftp matches escaped, no decoration
- gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/,%{#{@brace_url.xml_open}<a href="mailto:\\1">\\1</a>#{@brace_url.xml_close}}).
- gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,%{#{@brace_url.xml_open}<a href="\\1" target="_top">\\1</a>#{@brace_url.xml_close}}) #http ftp matches with decoration
+ gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/,%{#{the_url_decoration.xml_open}<a href="mailto:\\1">\\1</a>#{the_url_decoration.xml_close}}).
+ gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,%{#{the_url_decoration.xml_open}<a href="\\1" target="_top">\\1</a>#{the_url_decoration.xml_close}}) #http ftp matches with decoration
if dob.obj =~/#{Xx[:html_relative2]}\/\S+/ \
and dob.obj !~/(\"#{Xx[:html_relative2]}\/\S+?\"|>\s*#{Xx[:html_relative2]}\/\S+<)/
dob.obj=dob.obj.gsub(/(#{Xx[:html_relative2]}\/\S+)/,'<a href="\1">\1</a>')
@@ -245,9 +245,9 @@ module SiSU_HTML_Tune
and dob.obj !~/(\"..\/\S+?\"|>\s*..\/\S+<)/
dob.obj=dob.obj.gsub(/\.\.(\/\S+)/,%{<a href="#{Xx[:html_relative2]}\1">\1</a>})
end
- dob.obj=dob.obj.gsub(/<a href=":/,%{<a href="#{@vz.url_site}/}).
- gsub(/<a href="\.\.\//,%{<a href="#{@vz.url_site}/}).
- gsub(/<a href="#{Xx[:html_relative2]}\//,%{<a href="#{@vz.url_site}/})
+ dob.obj=dob.obj.gsub(/<a href=":/,%{<a href="#{the_url.site}/}).
+ gsub(/<a href="\.\.\//,%{<a href="#{the_url.site}/}).
+ gsub(/<a href="#{Xx[:html_relative2]}\//,%{<a href="#{the_url.site}/})
else
dob.obj=dob.obj.gsub(/</m,'&lt;').gsub(/>/m,'&gt;')
end
@@ -277,7 +277,7 @@ module SiSU_HTML_Tune
def markup(dob)
dob.obj=dob.obj.gsub(/#{Mx[:mk_o]}#([a-zA-Z]+)#{Mx[:mk_c]}/,'&\1;').
gsub(/#{Mx[:mk_o]}(#[0-9]+)#{Mx[:mk_c]}/,'&\1;')
- dob.obj=dob.obj.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,'<br />') unless dob.is==:table
+ dob.obj=dob.obj.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,'<br>') unless dob.is==:table
dob.obj=dob.obj.gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'<b>\1</b>').
gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'<i>\1</i>').
gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'<u>\1</u>').