aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/epub_concordance.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/epub_concordance.rb')
-rw-r--r--lib/sisu/v3/epub_concordance.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/sisu/v3/epub_concordance.rb b/lib/sisu/v3/epub_concordance.rb
index e2e5bb5c..b6a20d00 100644
--- a/lib/sisu/v3/epub_concordance.rb
+++ b/lib/sisu/v3/epub_concordance.rb
@@ -85,7 +85,10 @@ module SiSU_EPUB_Concordance
SiSU_Screen::Ansi.new(@md.opt.cmd,"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words").warn unless @md.opt.cmd =~/q/
SiSU_EPUB_Concordance::Source::Words.new(@particulars).songsheet
end
- rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
+ rescue
+ SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do
+ __LINE__.to_s + ':' + __FILE__
+ end
ensure
end
end
@@ -167,7 +170,10 @@ WOK
@rxp_excluded0=/^(?:#{Mx[:fa_bold_o]}|#{Mx[:fa_italics_o]})?(?:to\d+|\d+| |#{Mx[:br_endnotes]}|EOF|#{Mx[:br_eof]}|thumb_\S+|snap_\S+|_+|-+|[(]?(?:ii+|iv|vi+|ix|xi+|xiv|xv|xvi+|xix|xx)[).]?|\S+?_\S+|[\d_]+\w\S+|[\w\d]{1,2}|\d{1,3}\w?|[0-9a-f]{16,64}|\d{2,3}x\d{2,3}|\S{0,2}sha\d|\S{0,3}\d{4}w\d\d|\b\w\d+|\d_all\b|e\.?g\.?)(?:#{Mx[:fa_bold_c]}|#{Mx[:fa_italics_c]})?$/mi #this regex causes and cures a stack dump in ruby 1.9 !!!
@rgx_splitlist=%r{[—.,;:-]+|#{Mx[:nbsp]}+}mi
@rgx_scanlist=%r{#{Mx[:fa_italics_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_italics_c]}|#{Mx[:fa_bold_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_bold_c]}|#{Mx[:url_o]}https?://\S+?#{Mx[:url_c]}|file://\S+|<\S+?>|\w+|[a-zA-Z]+}mi
- rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
+ rescue
+ SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do
+ __LINE__.to_s + ':' + __FILE__
+ end
end
end
def songsheet
@@ -178,7 +184,10 @@ WOK
p "#{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}"
@file_concordance=File.open("#{@path}/content/#{@md.fn[:epub_concord]}",'w')
map_para
- rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
+ rescue
+ SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do
+ __LINE__.to_s + ':' + __FILE__
+ end
ensure
@file_concordance.close
end