aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/html_segments.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-03-01 20:41:28 -0500
committerRalph Amissah <ralph@amissah.com>2011-03-01 20:41:28 -0500
commit05a3fd233ec1ac4475bd797449d1284f6824c005 (patch)
treefdd93c057196640ec4907f58f66cf5bc00dfbdf6 /lib/sisu/v3/html_segments.rb
parentv3: use rb1.9.2 "require_relative" syntax (diff)
v3: ruby 1.9 hash symbol syntax adopted
Diffstat (limited to 'lib/sisu/v3/html_segments.rb')
-rw-r--r--lib/sisu/v3/html_segments.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sisu/v3/html_segments.rb b/lib/sisu/v3/html_segments.rb
index 263d7399..5fcb6cf0 100644
--- a/lib/sisu/v3/html_segments.rb
+++ b/lib/sisu/v3/html_segments.rb
@@ -77,7 +77,7 @@ module SiSU_HTML_seg
if @title_banner_
@seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author)
end
- txt_obj={:txt =>'Endnotes',:ocn_display =>''}
+ txt_obj={ txt: 'Endnotes', ocn_display: '' }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
@seg[:headings] << format_seg.title_heading1
filename_seg << @seg[:heading_endnotes] << @minitoc << @seg[:headings] << %{\n<div class="content">\n} << @seg[:endnote_all] << '</div>' # << '</div>'
@@ -87,7 +87,7 @@ module SiSU_HTML_seg
if @title_banner_
@seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author)
end
- txt_obj={:txt =>'Index',:ocn_display =>''}
+ txt_obj={ txt: 'Index', ocn_display: '' }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
@seg[:headings] << format_seg.title_heading1
filename_seg << @seg[:heading_idx] << @minitoc << @seg[:headings] << %{\n<div class="content">\n} << @seg[:idx] << '</div>' # << '</div>'
@@ -98,7 +98,7 @@ module SiSU_HTML_seg
if @title_banner_
@seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author)
end
- txt_obj={:txt =>'Metadata',:ocn_display =>''}
+ txt_obj={ txt: 'Metadata', ocn_display: '' }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
@seg[:headings] << format_seg.title_heading1
filename_seg << @seg[:heading_idx] << @minitoc << @seg[:headings] << %{\n<div class="content">\n} << metadata << '</div>' # << '</div>'
@@ -330,7 +330,7 @@ module SiSU_HTML_seg
else ''
end
@p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn)
- txt_obj={:txt =>@@heading1,:ocn_display =>@p_num.ocn_display}
+ txt_obj={ txt: @@heading1, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
@@seg[:headings] << format_seg.title_heading1.gsub(clean,'')
@@heading1.gsub!(/&nbsp;<a name="-[\d*+]+" href="#_[\d*+]+">&nbsp;<sup>[\d*+]+<\/sup>&nbsp;<\/a>/,'')
@@ -341,7 +341,7 @@ module SiSU_HTML_seg
else ''
end
@p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn)
- txt_obj={:txt =>heading2,:ocn_display =>@p_num.ocn_display}
+ txt_obj={ txt: heading2, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
@@seg[:headings] << format_seg.title_heading2.gsub(clean,'')
@@heading2.gsub!(/&nbsp;<a name="-[\d*+]+" href="#_[\d*+]+">&nbsp;<sup>[\d*+]+<\/sup>&nbsp;<\/a>/,'')
@@ -352,7 +352,7 @@ module SiSU_HTML_seg
else ''
end
@p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn)
- txt_obj={:txt =>heading3,:ocn_display =>@p_num.ocn_display}
+ txt_obj={ txt: heading3, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
@@seg[:headings] << format_seg.title_heading3.gsub(clean,'')
@@heading3.gsub!(/&nbsp;<a name="-[\d*+]+" href="#_[\d*+]+">&nbsp;<sup>[\d*+]+<\/sup>&nbsp;<\/a>/,'')
@@ -363,7 +363,7 @@ module SiSU_HTML_seg
else ''
end
@p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn)
- txt_obj={:txt =>heading4,:ocn_display =>@p_num.ocn_display}
+ txt_obj={ txt: heading4, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
@@seg[:headings] << format_seg.title_heading4.gsub(clean,'')
end
@@ -495,11 +495,11 @@ module SiSU_HTML_seg
and dob.ln.to_s =~/^[56]/
case dob.ln
when 5
- txt_obj={:txt =>dob.obj.strip,:ocn =>dob.ocn}
+ txt_obj={ txt: dob.obj.strip, ocn: dob.ocn }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
subtoc=format_seg.subtoc_lev5 #keep and make available, this is the subtoc
when 6
- txt_obj={:txt =>dob.obj.strip,:ocn =>dob.ocn}
+ txt_obj={ txt: dob.obj.strip, ocn: dob.ocn }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
subtoc=format_seg.subtoc_lev6 #keep and make available, this is the subtoc
end
@@ -525,7 +525,7 @@ module SiSU_HTML_seg
e_n=note_match_seg[/(?:#{Mx[:en_a_o]}[\d*+]+|#{Mx[:en_b_o]}[*+]\d+)\s+(.+?)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m,1]
try=e_n.split(/<br \/>/)
try.each do |e|
- txt_obj={:txt =>e}
+ txt_obj={ txt: e }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
note_match=if e =~/#{Mx[:pa_o]}i[1-9]#{Mx[:pa_c]}/
format_seg.endnote_body_indent
@@ -538,7 +538,7 @@ module SiSU_HTML_seg
m=/(?:#{Mx[:en_a_o]}[\d*+]+|#{Mx[:en_b_o]}[*+]\d+)\s+(.+?href=")(#-[\d*+]+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi
endnote_part_a=note_match_seg[m,1]
endnote_part_b=note_match_seg[m,2]
- txt_obj={:endnote_part_a =>endnote_part_a,:endnote_part_b =>endnote_part_b}
+ txt_obj={ endnote_part_a: endnote_part_a, endnote_part_b: endnote_part_b }
format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)
note_match_all_seg=format_seg.endnote_seg_body(@@fn) #BUG WATCH 200408
@@seg[:endnote_all] << note_match_all_seg