aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/epub_segments.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/epub_segments.rb')
-rw-r--r--lib/sisu/v3/epub_segments.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/sisu/v3/epub_segments.rb b/lib/sisu/v3/epub_segments.rb
index 57e6580b..0f45fe23 100644
--- a/lib/sisu/v3/epub_segments.rb
+++ b/lib/sisu/v3/epub_segments.rb
@@ -298,9 +298,9 @@ WOK
and @md.creator.author
@author=%{<b>#{@md.creator.author}</b>\n}
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_EPUB_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: @@heading1, ocn_display: @p_num.ocn_display }
format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj)
@@ -309,9 +309,9 @@ WOK
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_EPUB_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading2, ocn_display: @p_num.ocn_display }
format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj)
@@ -320,9 +320,9 @@ WOK
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_EPUB_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading3, ocn_display: @p_num.ocn_display }
format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj)
@@ -331,9 +331,9 @@ WOK
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_EPUB_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading4, ocn_display: @p_num.ocn_display }
format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj)