aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/sst_convert_markup.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/sst_convert_markup.rb')
-rw-r--r--lib/sisu/v5/sst_convert_markup.rb27
1 files changed, 20 insertions, 7 deletions
diff --git a/lib/sisu/v5/sst_convert_markup.rb b/lib/sisu/v5/sst_convert_markup.rb
index cbf40f24..6eaa691e 100644
--- a/lib/sisu/v5/sst_convert_markup.rb
+++ b/lib/sisu/v5/sst_convert_markup.rb
@@ -79,7 +79,7 @@ module SiSU_Modify
def message(text)
response=''
unless @opt.cmd=~/QQ/ \
- or @opt.cmd=~/q/
+ or @opt.act[:quiet][:set]==:on
response=@ask.response?(%{#{ text}\nProceed? })
end
end
@@ -258,7 +258,7 @@ WOK
end
end
if @matched
- puts "conversion match in #{i}" unless @opt.cmd=~/q/
+ puts "conversion match in #{i}" unless @opt.act[:quiet][:set]==:on
@flag_start=true
cont.each do |y|
if y =~end_processing
@@ -269,10 +269,18 @@ WOK
match_and_replace.each do |m,r,w|
if y =~m \
and y =~w
- puts m.inspect + ' -> ' + r unless @opt.cmd=~/q/
- puts "in: #{y}" if @opt.cmd=~/[vVM]/
+ puts m.inspect + ' -> ' + r unless @opt.act[:quiet][:set]==:on
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ puts "in: #{y}"
+ end
y.gsub!(m,r) if m and r
- puts "out: #{y}" if @opt.cmd=~/[vVM]/
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ puts "out: #{y}"
+ end
end
end
end
@@ -285,9 +293,14 @@ WOK
: false
end
@file.close
- else puts "NO conversion match in #{i}" unless @opt.cmd=~/q/
+ else puts "NO conversion match in #{i}" unless @opt.act[:quiet][:set]==:on
+ end
+ else
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ puts "Requested conversion #{@opt.mod.inspect} markup #{markup_version} identified in #{i}"
end
- else puts "Requested conversion #{@opt.mod.inspect} markup #{markup_version} identified in #{i}" if @opt.cmd=~/[vVM]/
end
end
end