aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/html_tune.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-02-05 01:02:31 -0500
committerRalph Amissah <ralph@amissah.com>2014-02-05 01:02:31 -0500
commit99c5b5d56f8785ee9ec2cc991c55a8a2eb6524bb (patch)
tree709cf7ab40ec7d5ab3e5ee25d1cbd1ac75a1dd57 /lib/sisu/v6/html_tune.rb
parentv5 v6: ocn: strict html; turn on/off rules for txt & odf (diff)
v5 v6: html, endnote name and nameref make compliant (epub use same)
Diffstat (limited to 'lib/sisu/v6/html_tune.rb')
-rw-r--r--lib/sisu/v6/html_tune.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sisu/v6/html_tune.rb b/lib/sisu/v6/html_tune.rb
index 384a19b0..516deaa5 100644
--- a/lib/sisu/v6/html_tune.rb
+++ b/lib/sisu/v6/html_tune.rb
@@ -256,14 +256,14 @@ module SiSU_HTML_Tune
def endnotes_html(dob)
unless dob.is ==:code
dob.obj=dob.obj.gsub(/(#{Mx[:en_a_o]}|#{Mx[:en_b_o]})(\d+)\s+(.+?)(#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/,
- '&nbsp;<a name="-\2" href="#_\2">&nbsp;<sup>\2</sup>&nbsp;</a> ' + #note- endnote-
- '\1\2 <a name="_\2" href="#-\2">&nbsp;<sup>\2.</sup></a> \3 \4'). #endnote- note- (careful may have switched)
+ %{&nbsp;<a name="#{Mx[:note_ref]}\\2" href="##{Mx[:note]}\\2">&nbsp;<sup>\\2</sup>&nbsp;</a> } +
+ %{\\1\\2 <a name="#{Mx[:note]}\\2" href="##{Mx[:note_ref]}\\2">&nbsp;<sup>\\2.</sup></a> \\3 \\4}).
gsub(/(#{Mx[:en_b_o]})([*+]\d+)\s+(.+?)(#{Mx[:en_b_c]})/,
- '&nbsp;<a name="-\2" href="#_\2">&nbsp;<sup>\2</sup>&nbsp;</a> ' + #note- endnote-
- '\1\2 <a name="_\2" href="#-\2">&nbsp;<sup>\2.</sup></a> \3 \4'). #endnote- note- (careful may have switched)
+ %{&nbsp;<a name="#{Mx[:note_ref]}\\2" href="##{Mx[:note]}\\2">&nbsp;<sup>\\2</sup>&nbsp;</a> } +
+ %{\\1\\2 <a name="#{Mx[:note]}\\2" href="##{Mx[:note_ref]}\\2">&nbsp;<sup>\\2.</sup></a> \\3 \\4}).
gsub(/(#{Mx[:en_a_o]})([*+]+)\s+(.+?)(#{Mx[:en_a_c]})/,
- '&nbsp;<a name="-\2" href="#_\2">&nbsp;<sup>\2</sup>&nbsp;</a> ' + #note- endnote-
- '\1\2 <a name="_\2" href="#-\2">&nbsp;<sup>\2</sup></a> \3 \4') #endnote- note- (careful may have switched)
+ %{&nbsp;<a name="#{Mx[:note_ref]}\\2" href="##{Mx[:note]}\\2">&nbsp;<sup>\\2</sup>&nbsp;</a> } +
+ %{\\1\\2 <a name="#{Mx[:note]}\\2" href="##{Mx[:note_ref]}\\2">&nbsp;<sup>\\2</sup></a> \\3 \\4})
end
dob
end