aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/shared_metadata.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/shared_metadata.rb')
-rw-r--r--lib/sisu/v5/shared_metadata.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sisu/v5/shared_metadata.rb b/lib/sisu/v5/shared_metadata.rb
index 9f4f4362..17e0a4c4 100644
--- a/lib/sisu/v5/shared_metadata.rb
+++ b/lib/sisu/v5/shared_metadata.rb
@@ -58,8 +58,10 @@
=end
module SiSU_Metadata
+ require_relative 'xml_parts' # xml_parts.rb
require_relative 'xml_shared' # xml_shared.rb
class Summary
+ include SiSU_Parts_XML
attr_accessor :tag,:inf,:class,:attrib
def initialize(md,display_heading=false)
@md,@display_heading=md,display_heading
@@ -916,7 +918,6 @@ WOK
end
def odf
def meta_para
- url_brace=SiSU_Viz::Defaults.new.url_decoration
if @inf.is_a?(String)
@inf=@inf.gsub(/</,'&lt;').gsub(/>/,'&gt;').
gsub(/&lt;br(?: \/)?&gt;/,'<br />')
@@ -938,13 +939,13 @@ WOK
'\1<text:a xl:type="simple" xl:href="\2">\2</text:a>') #special case \{ e.g. \}http://url
@inf=if @inf =~/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/
@inf.gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,
- %{#{url_brace.xml_open}<text:a xl:type="simple" xl:href="\\1">\\1</text:a>#{url_brace.xml_close}}) #http ftp matches with decoration
+ %{#{the_url_decoration.xml_open}<text:a xl:type="simple" xl:href="\\1">\\1</text:a>#{the_url_decoration.xml_close}}) #http ftp matches with decoration
else
@inf.gsub(/(https?:\/\/[^<>()'"\s]+)/,
- %{#{url_brace.xml_open}<text:a xl:type="simple" xl:href="\\1">\\1</text:a>#{url_brace.xml_close}}) #http ftp matches with decoration
+ %{#{the_url_decoration.xml_open}<text:a xl:type="simple" xl:href="\\1">\\1</text:a>#{the_url_decoration.xml_close}}) #http ftp matches with decoration
end
@inf=@inf.gsub(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/,
- %{#{url_brace.xml_open}<text:a xl:type="simple" xl:href="mailto:\\1">\\1</text:a>#{url_brace.xml_close}}) if @inf !~/http:\/\// # improve upon, document crash where url contains '@' symbol
+ %{#{the_url_decoration.xml_open}<text:a xl:type="simple" xl:href="mailto:\\1">\\1</text:a>#{the_url_decoration.xml_close}}) if @inf !~/http:\/\// # improve upon, document crash where url contains '@' symbol
end
<<WOK
<text:p text:style-name="P1">#{@tag.capitalize}: #{@inf}</text:p>