aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-11-02 23:00:22 -0400
committerRalph Amissah <ralph@amissah.com>2013-11-02 23:00:22 -0400
commit804dada787a251e6cedae4c4c9ddb781ec74b8af (patch)
treef69234123b8edd66f344ae4ed3161aefb4c3ea45 /lib/sisu/v4
parentdebian/changelog (4.2.9-1) (diff)
parentv5: plaintext, reorganize (diff)
Merge tag 'sisu_4.2.10' into debian/sid
SiSU 4.2.10
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