aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-11-02 22:55:29 -0400
committerRalph Amissah <ralph@amissah.com>2013-11-02 22:55:29 -0400
commita89fd60f2b523d3ba26b1a2e198eacf6304e2729 (patch)
tree77145f4c6712f5ceef548973d7488e6122f0b160 /lib/sisu/v4
parentv4 v5: version & changelog (diff)
v4 v5: constants, ocn output delimiter (where used) changed to 「...」
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r--lib/sisu/v4/constants.rb1
-rw-r--r--lib/sisu/v4/odf_format.rb4
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb
index 478b7277..f95b1dbd 100644
--- a/lib/sisu/v4/constants.rb
+++ b/lib/sisu/v4/constants.rb
@@ -176,6 +176,7 @@ Rx={
meta: /#{Mx[:meta_o]}(\S+?)#{Mx[:meta_c]}/,
}
Dx={
+ ocn_o: '「', ocn_c: '」',
url_o: '‹', url_c: '›',
url_o_xml: '&lt;', url_c_xml: '&gt;',
rel_o: '‹', rel_c: '›',
diff --git a/lib/sisu/v4/odf_format.rb b/lib/sisu/v4/odf_format.rb
index 348ebb62..79f68478 100644
--- a/lib/sisu/v4/odf_format.rb
+++ b/lib/sisu/v4/odf_format.rb
@@ -69,12 +69,12 @@ module SiSU_ODF_Format
end
def set_ref_and_display
set_ref=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript"><text:reference-mark-start text:name="\1"/><text:reference-mark-end text:name="\1"/></text:span>')
- disp=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript">[\1]</text:span>')
+ disp=@paranum.gsub(/(\d+)/,%{ <text:span text:style-name="Span_subscript">#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}</text:span>})
{ display: disp, set_ref: set_ref }
end
def set_bookmark_and_display
set_ref=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript"><text:bookmark-start text:name="\1"/><text:bookmark-end text:name="\1"/></text:span>')
- disp=@paranum.gsub(/(\d+)/,' <text:span text:style-name="Span_subscript">[\1]</text:span>')
+ disp=@paranum.gsub(/(\d+)/,%{ <text:span text:style-name="Span_subscript">#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}</text:span>})
{ display: disp, set_ref: set_ref }
end
def name