aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/concordance.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-02-05 00:56:10 -0500
committerRalph Amissah <ralph@amissah.com>2014-02-05 00:56:10 -0500
commita151893efedaebc26d26a8f8611fb688a6de6d4f (patch)
treee5fbb47d3ce53c363af21f2242aa647d18b12f79 /lib/sisu/v5/concordance.rb
parentv5 v6: options, ocn switch on/off instructions (& defaults for plaintext & odt) (diff)
v5 v6: ocn: strict html; turn on/off rules for txt & odf
Diffstat (limited to 'lib/sisu/v5/concordance.rb')
-rw-r--r--lib/sisu/v5/concordance.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sisu/v5/concordance.rb b/lib/sisu/v5/concordance.rb
index 55892ab7..b9030123 100644
--- a/lib/sisu/v5/concordance.rb
+++ b/lib/sisu/v5/concordance.rb
@@ -240,12 +240,13 @@ WOK
end
end
protected
- def location_scroll(wordlocation,show)
- %{<a href="doc#{@md.lang_code_insert}#{Sfx[:html]}\##{wordlocation}">#{wordlocation}</a>; }
+ def location_scroll(wordlocation,show) # not used
+ %{<a href="doc#{@md.lang_code_insert}#{Sfx[:html]}\##{Mx[:ocn_id_char]}#{wordlocation}">#{wordlocation}</a>; }
end
- def location_seg(wordlocation,show) ##fix
+ def location_seg(wordlocation,show)
unless wordlocation.nil?
- wl=wordlocation.gsub(/(.+?)\#(\d+)/,"\\1#{@md.lang_code_insert}#{Sfx[:html]}#\\2")
+ wl=wordlocation.gsub(/(.+?)\#(\d+)/,
+ "\\1#{@md.lang_code_insert}#{Sfx[:html]}##{Mx[:ocn_id_char]}\\2") # id="o\d+" always available; a name="\d+" not available if html strict used
case wordlocation
when /#{@rxp_t1}|@rxp_t2}|#{@rxp_t3}/
%{[<a href="doc#{@md.lang_code_insert}#{Sfx[:html]}##{show}">H</a>]#{show}, }