aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/html.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/html.rb')
-rw-r--r--lib/sisu/v5/html.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/sisu/v5/html.rb b/lib/sisu/v5/html.rb
index f473f1b7..4a911d2c 100644
--- a/lib/sisu/v5/html.rb
+++ b/lib/sisu/v5/html.rb
@@ -61,7 +61,11 @@
=end
module SiSU_HTML
- require 'pstore'
+ begin
+ require 'pstore'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('pstore NOT FOUND (LoadError)')
+ end
require_relative 'particulars' # particulars.rb
include SiSU_Particulars
require_relative 'defaults' # defaults.rb
@@ -241,6 +245,7 @@ module SiSU_HTML
def initialize(md=nil,data='')
@data,@md=data,md
@vz=SiSU_Viz::Defaults.new
+ @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@tell=SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set]) if @md
end
def songsheet #extracts toc for scroll & seg
@@ -352,7 +357,7 @@ WOK
title=if dob.ocn ==0 then linkname
else
@@toc[:scr] << '<br />'
- %{<b><a href="##{dob.ocn}">#{linkname}</a></b>}
+ %{<b><a href="##{@ocn_html_identifier}#{dob.ocn}">#{linkname}</a></b>}
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
@@ -394,7 +399,7 @@ WOK
end
else
@@toc[:scr] << '<br />'
- %{<b><a href="##{dob.ocn}">#{linkname}</a></b>}
+ %{<b><a href="##{@ocn_html_identifier}#{dob.ocn}">#{linkname}</a></b>}
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
@@ -511,7 +516,7 @@ WOK
}
f=@md.file.base_filename.html_seg(fnh)
p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
- lnk_n_txt=%{ <a href="#{f}##{ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{@ocn_html_identifier}#{ocn}">
#{linkname}
</a>}
txt_obj={ txt: lnk_n_txt }
@@ -536,7 +541,7 @@ WOK
}
f=@md.file.base_filename.html_seg(fnh)
p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
- lnk_n_txt=%{ <a href="#{f}##{ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{@ocn_html_identifier}#{ocn}">
#{linkname}
</a>}
txt_obj={ txt: lnk_n_txt }
@@ -618,7 +623,8 @@ WOK
toc_shared << format_txt_obj.center_bold
@segtoc << format_txt_obj.center_bold
if defined? @md.creator.author
- creator_endnote=@md.creator.author.gsub(/(\*+)/,
+ creator=SiSU_HTML_Tune::CleanHTML.new(@md.creator.author).clean_for_html
+ creator_endnote=creator.gsub(/(\*+)/,
%{&nbsp;<sup><a href="#notes">\\1</a></sup>})
tmp_head=creator_endnote + "\n"
txt_obj={ txt: tmp_head }