aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-01-06 23:05:26 -0500
committerRalph Amissah <ralph@amissah.com>2014-01-06 23:05:26 -0500
commit4075d476731a7a1c29e399d60f6baa210f3d1cb4 (patch)
treeb0fab3d856f64f0562b7b7da317cf79c3b3e05f1 /lib/sisu/v4
parentdebian/changelog (4.2.16-1) (diff)
parentv5: heading recalibration, code (downstream) changes (diff)
Merge tag 'sisu_4.2.17' into debian/sid
SiSU 4.2.17
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r--lib/sisu/v4/dal_doc_str.rb2
-rw-r--r--lib/sisu/v4/epub_format.rb2
-rw-r--r--lib/sisu/v4/epub_tune.rb2
-rw-r--r--lib/sisu/v4/html.rb6
-rw-r--r--lib/sisu/v4/manifest.rb2
-rw-r--r--lib/sisu/v4/screen_text_color.rb2
-rw-r--r--lib/sisu/v4/sysenv.rb9
7 files changed, 14 insertions, 11 deletions
diff --git a/lib/sisu/v4/dal_doc_str.rb b/lib/sisu/v4/dal_doc_str.rb
index f9dd4954..96e1ac5d 100644
--- a/lib/sisu/v4/dal_doc_str.rb
+++ b/lib/sisu/v4/dal_doc_str.rb
@@ -813,7 +813,7 @@ module SiSU_DAL_DocumentStructureExtract
when /2/
'1'
when /3/
- '3'
+ '2'
end
end
def possible_children(parent)
diff --git a/lib/sisu/v4/epub_format.rb b/lib/sisu/v4/epub_format.rb
index 9873c96f..4a060806 100644
--- a/lib/sisu/v4/epub_format.rb
+++ b/lib/sisu/v4/epub_format.rb
@@ -1225,7 +1225,7 @@ module SiSU_EPUB_Format
x=x.gsub(/&nbsp;/,' ') if Ep[:alt]==:on
x.gsub(/&/,'&amp;').
gsub(/</,"&lt;").gsub(/>/,"&gt;").
- gsub(/#{Dx[:url_o]}/,Dx[:url_o_xml]).gsub(/#{Dx[:url_c]}/,Dx[:url_o_xml]).
+ gsub(/#{Dx[:url_o]}/,Dx[:url_o_xml]).gsub(/#{Dx[:url_c]}/,Dx[:url_c_xml]).
#gsub(/</,'&#60;').gsub(/>/,'&#62;').
gsub(/\\\\/,'<br />').
gsub(/&lt;br(?: \/)?&gt;/,'<br />')
diff --git a/lib/sisu/v4/epub_tune.rb b/lib/sisu/v4/epub_tune.rb
index 45291ca8..dd9f478d 100644
--- a/lib/sisu/v4/epub_tune.rb
+++ b/lib/sisu/v4/epub_tune.rb
@@ -156,7 +156,7 @@ module SiSU_EPUB_Tune
gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'<tt>\1</tt>'). # tt, kbd
gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,'').
gsub(/#{Mx[:gl_bullet]}/m,"●#{$ep[:hsp]*2}").
- gsub(/#{Dx[:url_o]}/,Dx[:url_o_xml]).gsub(/#{Dx[:url_c]}/,Dx[:url_o_xml]).
+ gsub(/#{Dx[:url_o]}/,Dx[:url_o_xml]).gsub(/#{Dx[:url_c]}/,Dx[:url_c_xml]).
gsub(/#{Mx[:nbsp]}/,$ep[:hsp]).
gsub(/<(p|br)>/,'<\1 />')
dob.obj=SiSU_EPUB_Tune::CleanXHTML.new(dob.obj).clean
diff --git a/lib/sisu/v4/html.rb b/lib/sisu/v4/html.rb
index 1dda9aae..7acb279a 100644
--- a/lib/sisu/v4/html.rb
+++ b/lib/sisu/v4/html.rb
@@ -329,7 +329,7 @@ WOK
and link !~/#/ #% keep eye on link
SiSU_HTML_Format::ParagraphNumber.new(@md,link)
end
- title=if dob.obj !~/Metadata/ then linkname
+ title=if dob.obj !~/^Metadata$/; linkname
else
link='metadata'
%{<b><a href="#{link}#{@md.lang_code_insert}#{Sfx[:html]}">#{linkname}</a></b>}
@@ -364,9 +364,7 @@ WOK
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
- toc[:scr]=if dob.name =~/^meta/ \
- and dob.obj =~/Document Information/
- format_toc.lev0
+ toc[:scr]=if dob.obj =~/^Metadata$/; ''
else format_toc.lev1
end
toc
diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb
index d86830e4..db409f46 100644
--- a/lib/sisu/v4/manifest.rb
+++ b/lib/sisu/v4/manifest.rb
@@ -757,7 +757,7 @@ WOK
metadata(id,info)
end
if @md.sisu_version
- id,info=@translate.sisu_version,"#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})"
+ id,info=@translate.sisu_version,"#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})#{@md.sisu_version[:install_method]}"
metadata(id,info)
end
if @md.ruby_version
diff --git a/lib/sisu/v4/screen_text_color.rb b/lib/sisu/v4/screen_text_color.rb
index 5e395133..304a677a 100644
--- a/lib/sisu/v4/screen_text_color.rb
+++ b/lib/sisu/v4/screen_text_color.rb
@@ -216,7 +216,7 @@ module SiSU_Screen
STDERR.puts "\t #{@cX.grey}#{@txt[0]}#{@cX.off} #{@cX.fuchsia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
end
def version
- puts "#{@cX.blue_hi}#{@txt[0]} #{@txt[1]}#{@cX.off} #{@cX.grey} (#{@txt[3]} [#{@txt[2]}]) &#{@cX.off} #{@cX.ruby}Ruby#{@cX.off} #{@cX.grey}(#{@txt[4]})#{@cX.off}\n"
+ puts "#{@cX.blue_hi}#{@txt[0]} #{@txt[1]}#{@cX.off} #{@cX.grey} (#{@txt[3]} [#{@txt[2]}])#{@txt[4]} &#{@cX.off} #{@cX.ruby}Ruby#{@cX.off} #{@cX.grey}(#{@txt[5]})#{@cX.off}\n"
end
def html3numbers
puts %{\t#{@cX.green}#{@txt[0]}#{@cX.off} #{@cX.cyan}files processed#{@cX.off}. } +
diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb
index c0598070..b216089d 100644
--- a/lib/sisu/v4/sysenv.rb
+++ b/lib/sisu/v4/sysenv.rb
@@ -797,7 +797,7 @@ module SiSU_Env
? (system(%{
echo "#{@input}" | #{program} -s 3 -o #{@output}
}))
- : (STDERR.puts "\t*WARN* #{program} is not installed #{program_ref}" if cmd =~/V/)
+ : (STDERR.puts "\t*WARN* #{program} is not installed #{program_ref}" if @cmd =~/V/)
#found
end
def imagemagick #imagemagick is a image manipulation program
@@ -3599,6 +3599,11 @@ WOK
if File.exist?(yst_ver)
@version=YAML::load(File::open(yst_ver)) #unless @@noyaml
end
+ spec = Gem::Specification.find_by_name("sisu")
+ gem_root = spec.gem_dir
+ @version[:install_method]=(File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_version_dir}/,'')) == gem_root) \
+ ? ' (ruby gem install)'
+ : ''
@version
end
def rbversion
@@ -3618,7 +3623,7 @@ WOK
@color.cmd
else '-v'
end
- SiSU_Screen::Ansi.new(opt_cmd,version[:project],version[:version],version[:date_stamp],version[:date],rb_ver).version
+ SiSU_Screen::Ansi.new(opt_cmd,version[:project],version[:version],version[:date_stamp],version[:date],version[:install_method],rb_ver).version
else puts 'SiSU (version information not available)'
end
end