diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v5/composite.rb | 9 | ||||
-rw-r--r-- | lib/sisu/v6/composite.rb | 14 |
2 files changed, 11 insertions, 12 deletions
diff --git a/lib/sisu/v5/composite.rb b/lib/sisu/v5/composite.rb index cd281e26..adc88e52 100644 --- a/lib/sisu/v5/composite.rb +++ b/lib/sisu/v5/composite.rb @@ -141,11 +141,11 @@ module SiSU_Assemble end if not @code_flag \ and i !~/^%+\s/ - i=i.gsub(/^([123]|:?[ABC])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax) + i=i.gsub(/^([123]|:?[ABCD])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax) if i =~/^@\S+?:/ i=i.gsub(/\n/m,"\n% "). gsub(/\n%\s+$/m,''). - gsub(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers + gsub(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers end end file[:prepared] << i @@ -171,6 +171,7 @@ module SiSU_Assemble or para =~/^(?:<<\s*)\|(\S+?)\|@\|.+?\|(?:req(?:quire)?\b|\s*\})?/ \ or para =~/^r\{(.+?)\}/ #depreciated loadfile=$1.strip + src_ssm=@opt.fns.sub(/\.ssm\.sst/,'.ssm') if (@opt.act[:verbose][:set]==:on \ || @opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) @@ -200,7 +201,7 @@ module SiSU_Assemble file[:prepared] else cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX - STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" + STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" para end else tuned_file << para @@ -255,7 +256,7 @@ module SiSU_Assemble @ssm << loadfile else cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX - STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" + STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" para end end diff --git a/lib/sisu/v6/composite.rb b/lib/sisu/v6/composite.rb index 02e9543e..79603e26 100644 --- a/lib/sisu/v6/composite.rb +++ b/lib/sisu/v6/composite.rb @@ -141,11 +141,11 @@ module SiSU_Assemble end if not @code_flag \ and i !~/^%+\s/ - i=i.gsub(/^([123]|:?[ABC])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax) + i=i.gsub(/^([123]|:?[ABCD])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax) if i =~/^@\S+?:/ i=i.gsub(/\n/m,"\n% "). gsub(/\n%\s+$/m,''). - gsub(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers + gsub(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers end end file[:prepared] << i @@ -166,11 +166,9 @@ module SiSU_Assemble tuned_file,imagedir=[],[] SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Composite Document',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").grey_title_hi unless @opt.act[:quiet][:set]==:on data.each do |para| - if para =~/^<<\s+(\S+?\.ss[it])$/ \ - or para =~/^<<\{(\S+?\.ss[it])\}$/ \ - or para =~/^(?:<<\s*)\|(\S+?)\|@\|.+?\|(?:req(?:quire)?\b|\s*\})?/ \ - or para =~/^r\{(.+?)\}/ #depreciated + if para =~/^<<\s+(\S+?\.ss[it])$/ loadfile=$1.strip + src_ssm=@opt.fns.sub(/\.ssm\.sst/,'.ssm') if (@opt.act[:verbose][:set]==:on \ || @opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) @@ -200,7 +198,7 @@ module SiSU_Assemble file[:prepared] else cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX - STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" + STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" para end else tuned_file << para @@ -255,7 +253,7 @@ module SiSU_Assemble @ssm << loadfile else cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX - STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" + STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}" para end end |