From 3804f096e2dd3c82ace274463df6b9b0767fbb60 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 7 Oct 2007 14:09:03 +0100 Subject: cleaning, and make sure in xml   rather than   is used --- lib/sisu/v0/shared_html_lite.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/sisu/v0/shared_html_lite.rb') diff --git a/lib/sisu/v0/shared_html_lite.rb b/lib/sisu/v0/shared_html_lite.rb index f258f0a9..85368a28 100644 --- a/lib/sisu/v0/shared_html_lite.rb +++ b/lib/sisu/v0/shared_html_lite.rb @@ -93,7 +93,7 @@ module SiSU_Format_Shared else m,u=/\{(.+?)\}((?:https?|file|ftp)\S+|image)/.match(word).captures d='' end - case m + word=case m when /\.png|\.jpg|\.gif|c=|\d+x\d+/ w,h=/(\d+)x(\d+)/.match(m).captures if m =~/\d+x\d+/ w=%{width="#{w}"} if w @@ -117,20 +117,18 @@ module SiSU_Format_Shared #ins=%{#{link} [link]#{d}} word.gsub!(/\{.+?\}(?:https?|file|ftp)\S+/,ins) end - word else word end word end - @words + @words=@words.join(' ') end def markup(para) if para !~/^<:code>/ if para =~/\{.+?\}((?:https?|file|ftp)\S+|image)/ wm=para.scan(/\{.+?\}(?:(?:https?|file|ftp)\S+|image)|\S+/) - word_mode=urls(wm) - words=word_mode.join(' ') - para.gsub!(/.+/,words) + words=urls(wm) + para.gsub!(/.+/m,words) end para.gsub!(/\b[_\\]((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'\1\2') #http ftp matches escaped, no decoration para.gsub!(/((?:^|\s)[}])((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'\1\2\3') #special case \{ e.g. \}http://url -- cgit v1.2.3