aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/html_segments.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/html_segments.rb')
-rw-r--r--lib/sisu/v3/html_segments.rb30
1 files changed, 14 insertions, 16 deletions
diff --git a/lib/sisu/v3/html_segments.rb b/lib/sisu/v3/html_segments.rb
index b527eaba..81bb08d4 100644
--- a/lib/sisu/v3/html_segments.rb
+++ b/lib/sisu/v3/html_segments.rb
@@ -312,9 +312,9 @@ module SiSU_HTML_Seg
@@get_hash_to=dob.name
@@get_hash_fn=dob.name
end
- if dob.obj.class==String
+ if dob.obj.is_a?(String)
markup(dob)
- elsif dob.obj.class==Array
+ elsif dob.obj.is_a?(Array)
dob.obj.each do |pg|
markup(pg)
end
@@ -370,13 +370,12 @@ module SiSU_HTML_Seg
else ''
end
@@seg[:tocband_bannerless] << '<br />' << conditional_div_close << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav])
- @@seg[:headings] << format_head_seg.seg_head_escript if SiSU_HTML_Format::HeadSeg.method_defined? :seg_head_escript #debug PHP move up in text #bug
if @title_banner_
@@seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author).gsub(clean,'')
end
- ocn=if @@heading1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix
- else ''
- end
+ ocn=(@@heading1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
+ ? $1
+ : ''
@p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: @@heading1, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
@@ -385,9 +384,9 @@ module SiSU_HTML_Seg
end
if @@is2==1
heading2=@@heading2
- ocn=if heading2[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix
- else ''
- end
+ ocn=(heading2[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
+ ? $1
+ : ''
@p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading2, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
@@ -396,9 +395,9 @@ module SiSU_HTML_Seg
end
if @@is3==1
heading3=@@heading3
- ocn=if heading3[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix
- else ''
- end
+ ocn=(heading3[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
+ ? $1
+ : ''
@p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading3, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
@@ -407,9 +406,9 @@ module SiSU_HTML_Seg
end
if @@is4==1
heading4=@@heading4
- ocn=if heading4[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix
- else ''
- end
+ ocn=(heading4[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
+ ? $1
+ : ''
@p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading4, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
@@ -472,7 +471,6 @@ module SiSU_HTML_Seg
elsif dob.is==:table
sto.table
elsif dob.is==:break
- sto.break
end
if @md.flag_separate_endnotes
dob.obj=dob.obj.gsub(/"\s+href="#_(\d+)">/,%{" href=\"endnotes#{Sfx[:html]}#_\\1">}) #endnote- twice #removed file type