aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/develop/html_format.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2015-01-07 19:04:46 -0500
committerRalph Amissah <ralph@amissah.com>2015-01-07 22:42:40 -0500
commit881e80ccce53136652b269aa34b6c7cb6ceb34ca (patch)
treee87f7292914f2b5cf90ebc7fc8b4fd4483cc4289 /lib/sisu/develop/html_format.rb
parentc&d: small fixes (diff)
c&d: html, ocn link back to self reinstated
* requested, used as quick means to get object url reference link * d: removed ocn_html_identifier variable, unnecessary in html5 (requirement previously forced by html4)
Diffstat (limited to 'lib/sisu/develop/html_format.rb')
-rw-r--r--lib/sisu/develop/html_format.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/sisu/develop/html_format.rb b/lib/sisu/develop/html_format.rb
index 5d7a4a7d..1692e452 100644
--- a/lib/sisu/develop/html_format.rb
+++ b/lib/sisu/develop/html_format.rb
@@ -60,7 +60,6 @@ module SiSU_HTML_Format
def initialize(md,ocn)
@md,@ocn=md,ocn.to_s
@ocn ||=''
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@make=SiSU_Env::ProcessingSettings.new(@md)
end
def ocn_display
@@ -69,7 +68,7 @@ module SiSU_HTML_Format
or @ocn.empty?
''
else
- %{<label class="ocn">#{@ocn}</label>}
+ %{<label class="ocn"><a href="##{@ocn}" class="lnkocn">#{@ocn}</a></label>}
end
else
''
@@ -89,7 +88,7 @@ module SiSU_HTML_Format
end
def goto
(@ocn==nil || @ocn.empty?) \
- ? '' : %{<a href="##{@ocn_html_identifier}#{@ocn}">}
+ ? '' : %{<a href="##{@ocn}">}
end
end
class HeadInformation
@@ -1147,7 +1146,6 @@ WOK
end
def subtoc_lev(tag,attrib)
@txt=clean(@txt)
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
txt=if @txt \
and @txt =~/<\/?i>|<a\s+name="\S+?">/mi
@txt.gsub(/<\/?i>|<a\s+name="\S+?">/mi,'') #removes name markers from subtoc, go directly to substantive text
@@ -1161,7 +1159,7 @@ WOK
gsub(/<a[\s]+name="-\d+"[\s]+href="#_\d+">&nbsp;<sup>\d+<\/sup>&nbsp;/m,'')
end
%{<#{tag} class="#{attrib}">
- <a href="##{@ocn_html_identifier}#{@ocn}"><i>#{txt}</i></a> #{note}
+ <a href="##{@ocn}"><i>#{txt}</i></a> #{note}
</#{tag}>}
end
def subtoc_lev5