From a90463bbbc266938a39ef9110db3e0edf56b5f94 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 6 Jan 2014 22:31:25 -0500 Subject: 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 --- lib/sisu/v5/html.rb | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'lib/sisu/v5/html.rb') diff --git a/lib/sisu/v5/html.rb b/lib/sisu/v5/html.rb index 955b57f1..fda8e8ab 100644 --- a/lib/sisu/v5/html.rb +++ b/lib/sisu/v5/html.rb @@ -342,7 +342,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$/ then linkname else link='metadata' %{#{linkname}} @@ -370,16 +370,13 @@ WOK end else @@toc[:scr] << '
' - link=(dob.ln) \ - ? dob.ln - : '' - %{#{linkname}} + %{#{linkname}} 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$/ then '' + elsif txt_obj[:txt] =~// + format_toc.lev1.gsub(/|<\/a>/,'') else format_toc.lev1 end toc @@ -401,7 +398,10 @@ WOK title=%{#{p_num.goto}#{linkname}} txt_obj={ txt: title } format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) - toc[:scr]=format_toc.lev2 + toc[:scr]=if txt_obj[:txt] =~// + format_toc.lev2.gsub(/|<\/a>/,'') + else format_toc.lev2 + end end toc end @@ -422,7 +422,10 @@ WOK title=%{#{p_num.goto}#{linkname}} txt_obj={ txt: title } format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) - toc[:scr]=format_toc.lev3 + toc[:scr]=if txt_obj[:txt] =~// + format_toc.lev3.gsub(/|<\/a>/,'') + else format_toc.lev3 + end end toc end -- cgit v1.2.3