diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-02-05 00:56:10 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-02-05 00:56:10 -0500 |
commit | a151893efedaebc26d26a8f8611fb688a6de6d4f (patch) | |
tree | e5fbb47d3ce53c363af21f2242aa647d18b12f79 /lib/sisu/v6/concordance.rb | |
parent | v5 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/v6/concordance.rb')
-rw-r--r-- | lib/sisu/v6/concordance.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sisu/v6/concordance.rb b/lib/sisu/v6/concordance.rb index a20178ab..5422056f 100644 --- a/lib/sisu/v6/concordance.rb +++ b/lib/sisu/v6/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}, } |