aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sst_do_inline_footnotes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/sst_do_inline_footnotes.rb')
-rw-r--r--lib/sisu/v3/sst_do_inline_footnotes.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/sisu/v3/sst_do_inline_footnotes.rb b/lib/sisu/v3/sst_do_inline_footnotes.rb
index 4ceb54fa..08c599ce 100644
--- a/lib/sisu/v3/sst_do_inline_footnotes.rb
+++ b/lib/sisu/v3/sst_do_inline_footnotes.rb
@@ -107,9 +107,9 @@ module SiSU_ConvertFootnotes
@@fns=@opt.fns
@@dal_array=[]
end
- dal=if @@dal_array.empty?; read_fnm
- else @@dal_array.dup #check
- end
+ dal=(@@dal_array.empty?) \
+ ? read_fnm
+ : @@dal_array.dup #check
rescue
SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do
__LINE__.to_s + ':' + __FILE__
@@ -145,9 +145,9 @@ module SiSU_ConvertFootnotes
end
def read_fnm
dal=[]
- dal=if FileTest.file?(@fnm); File.open(@fnm){ |f| dal=Marshal.load(f)}
- else SiSU_ConvertFootnotes::Source.new(@opt).create_dal #watch
- end
+ dal=(FileTest.file?(@fnm)) \
+ ? (File.open(@fnm){ |f| dal=Marshal.load(f)})
+ : (SiSU_ConvertFootnotes::Source.new(@opt).create_dal) #watch
end
end
class Output
@@ -192,9 +192,9 @@ module SiSU_ConvertFootnotes
data=data.join.split("\n\n")
data_new=[]
data.each do |x|
- data_new << if x =~ /\n\n/m; x.split(/\n\n+/)
- else x
- end
+ data_new << (x =~ /\n\n/m) \
+ ? (x.split(/\n\n+/))
+ : x
end
data=data_new.flatten
data=SiSU_ConvertFootnotes::Make.new(@md,data).substitutions_and_insertions?
@@ -360,9 +360,9 @@ module SiSU_ConvertFootnotes
if para !~/^(?:@\S+:|0~\S+)\s/m \
and para !~/\A\s*\Z/m
@md.set_heading_top=true
- head=if @md.title.full ; ":A~ #{@md.title.full}"
- else ':A~ [no title provided]'
- end
+ head=(@md.title.full) \
+ ? (":A~ #{@md.title.full}")
+ : (':A~ [no title provided]')
@tuned_file << head
end
end
@@ -382,9 +382,9 @@ module SiSU_ConvertFootnotes
and para !~/\A\s*\Z/m \
and para !~/<:p[bn]>/
@md.set_heading_seg=true
- head=if @md.title.full ; "1~seg [#{@md.title.full}]"
- else '1~seg [segment]'
- end
+ head=(@md.title.full) \
+ ? ("1~seg [#{@md.title.full}]")
+ : ('1~seg [segment]')
@tuned_file << head
end
end