diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-10-12 10:56:59 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-10-12 10:56:59 -0400 |
commit | 2e4c214d4d2323864985ccfe93346a9796edee2f (patch) | |
tree | bd450b52b31b81fc46150ebee9d4e06bc7e1e560 /lib/sisu/v6/shared_metadata.rb | |
parent | debian/changelog (5.6.9-1) (diff) | |
parent | v5: merge v6: remove defaults.rb & some relics related to sisu skins (diff) |
Merge tag 'sisu_5.7.0' into debian/sid
SiSU 5.7.0
Diffstat (limited to 'lib/sisu/v6/shared_metadata.rb')
-rw-r--r-- | lib/sisu/v6/shared_metadata.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sisu/v6/shared_metadata.rb b/lib/sisu/v6/shared_metadata.rb index 998c48df..646d7f72 100644 --- a/lib/sisu/v6/shared_metadata.rb +++ b/lib/sisu/v6/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(/</,'<').gsub(/>/,'>'). gsub(/<br(?: \/)?>/,'<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> |