diff options
Diffstat (limited to 'lib/sisu/v0/html_scroll.rb')
-rw-r--r-- | lib/sisu/v0/html_scroll.rb | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb index fb04f2f9..2f8bc1dd 100644 --- a/lib/sisu/v0/html_scroll.rb +++ b/lib/sisu/v0/html_scroll.rb @@ -112,33 +112,36 @@ module SiSU_HTML_scroll txt_obj={:txt =>@sto.text} format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj) end - case @sto.format - when /^1:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body1 - when /^2:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body2 - when /^3:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body3 - when /^4:\S+?/; para=@sto.scroll_lev_para_ocn.heading_body4 # work on see Split_text_object4 - when /^5:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body5 - when /^6:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body6 - when /^#{Mx[:gl_bullet]}/; para=@sto.scroll_lev_para_ocn.bullet + para=case @sto.format + when /^1:\S*?/; @sto.scroll_lev_para_ocn.heading_body1 + when /^2:\S*?/; @sto.scroll_lev_para_ocn.heading_body2 + when /^3:\S*?/; @sto.scroll_lev_para_ocn.heading_body3 + when /^4:\S+?/; @sto.scroll_lev_para_ocn.heading_body4 # work on see Split_text_object4 + when /^5:\S*?/; @sto.scroll_lev_para_ocn.heading_body5 + when /^6:\S*?/; @sto.scroll_lev_para_ocn.heading_body6 + when /^#{Mx[:gl_bullet]}/; @sto.scroll_lev_para_ocn.bullet when /^#{Mx[:pa_o]}:i([1-9])#{Mx[:pa_c]}#{Mx[:gl_bullet]}/ #indent with bullet format_txt_obj.gsub_body - para=@sto.scroll_lev_para_ocn.format('li',"i#{$1}") + @sto.scroll_lev_para_ocn.format('li',"i#{$1}") when /^i([1-9])$/ #indent format_txt_obj.gsub_body - para=@sto.scroll_lev_para_ocn.format('p',"i#{$1}") - when /^center$/; para=@sto.scroll_lev_para_ocn.center - when /^(?:b|bold)$/; para=@sto.scroll_lev_para_ocn.bold - when /^(?:verse|group|alt)$/; para=@sto.scroll_lev_para_ocn.para - when /^code$/; para=@sto.scroll_lev_para_ocn.code + @sto.scroll_lev_para_ocn.format('p',"i#{$1}") + when /^center$/; @sto.scroll_lev_para_ocn.center + when /^(?:b|bold)$/; @sto.scroll_lev_para_ocn.bold + when /^(?:verse|group|alt)$/; @sto.scroll_lev_para_ocn.para + when /^code$/; @sto.scroll_lev_para_ocn.code when /ordinary/ # see whether u can improve - if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ + para=if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ format_txt_obj.gsub_body - para=@sto.scroll_lev_para_ocn.para - if para =~/#{Mx[:gr_o]}Th?.+/ # tables come as single block + para=if para =~/#{Mx[:gr_o]}Th?.+/ # tables come as single block + #@sto=nil table=SiSU_HTML_shared::Table.new(para) - para=table.table_split + table.table_split + else @sto.scroll_lev_para_ocn.para end + else para end + else para end elsif para =~/^#{Mx[:lv_o]}[1-9]:/ \ and para !~/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_c]}#@dp:#@dp#{Mx[:id_c]}$/ |