aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
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/sysenv.rb2
5 files changed, 6 insertions, 8 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(/ /,' ') if Ep[:alt]==:on
x.gsub(/&/,'&').
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/sysenv.rb b/lib/sisu/v4/sysenv.rb
index e58f3fc4..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