lib/markdown_exec.rb in markdown_exec-1.3.6 vs lib/markdown_exec.rb in markdown_exec-1.3.7
- old
+ new
@@ -557,11 +557,11 @@
name: format(opts[:menu_divider_format],
mbody[:name]).send(opts[:menu_divider_color].to_sym) }
)
end
elsif opts[:menu_task_match].present? &&
- (mbody = fcb.body[0].match opts[:menu_task_match])
+ (fcb.body[0].match opts[:menu_task_match])
if use_chrome
blocks.push FCB.new(
{ chrome: true,
disabled: '',
name: format(
@@ -960,14 +960,14 @@
def save_execution_output
return unless @options[:save_execution_output]
@options[:logged_stdout_filename] =
- SavedAsset.new(blockname: @options[:block_name],
- filename: File.basename(@options[:filename], '.*'),
- prefix: @options[:logged_stdout_filename_prefix],
- time: Time.now.utc).stdout_name
+ SavedAsset.stdout_name(blockname: @options[:block_name],
+ filename: File.basename(@options[:filename], '.*'),
+ prefix: @options[:logged_stdout_filename_prefix],
+ time: Time.now.utc)
@options[:logged_stdout_filespec] =
File.join @options[:saved_stdout_folder],
@options[:logged_stdout_filename]
@logged_stdout_filespec = @options[:logged_stdout_filespec]
@@ -1033,10 +1033,11 @@
opts[:block_name] = ''
end
rescue StandardError => err
warn(error = "ERROR ** MarkParse.select_approve_and_execute_block(); #{err.inspect}")
+ warn err.backtrace
binding.pry if $tap_enable
raise ArgumentError, error
end
def select_md_file(files = list_markdown_files_in_path)
@@ -1113,13 +1114,13 @@
return unless call_options[:save_executed_script]
time_now = Time.now.utc
opts = optsmerge call_options
opts[:saved_script_filename] =
- SavedAsset.new(blockname: opts[:block_name],
- filename: opts[:filename],
- prefix: opts[:saved_script_filename_prefix],
- time: time_now).script_name
+ SavedAsset.script_name(blockname: opts[:block_name],
+ filename: opts[:filename],
+ prefix: opts[:saved_script_filename_prefix],
+ time: time_now)
@execute_script_filespec =
@options[:saved_filespec] =
File.join opts[:saved_script_folder], opts[:saved_script_filename]