diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-01-06 22:31:25 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-01-06 22:31:28 -0500 |
commit | a90463bbbc266938a39ef9110db3e0edf56b5f94 (patch) | |
tree | 80115f18400af6c89b53f4851292a4fbe5cd5bf9 /lib/sisu/v4 | |
parent | bin/sisu, version dir (fix) & version info (diff) |
v4 v5: fixes
* ao_doc_str, nodes, possible parents, correction
* epub, url closure decoration
* sysenv, qrcode report absent program, minor
* html scroll toc, clean links where none, exclude metadata
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r-- | lib/sisu/v4/dal_doc_str.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v4/epub_format.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v4/epub_tune.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v4/html.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v4/sysenv.rb | 2 |
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(/</,"<").gsub(/>/,">"). - 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(/</,'<').gsub(/>/,'>'). gsub(/\\\\/,'<br />'). gsub(/<br(?: \/)?>/,'<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 |