aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/plaintext.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-07-10 15:36:21 +0100
committerRalph Amissah <ralph@amissah.com>2007-07-10 15:36:21 +0100
commitce038ce1a78cfe1ecc8fbc50095a8e036880da72 (patch)
tree9005b4c7aa894b859880ce66d6d2b390b2e79105 /lib/sisu/v0/plaintext.rb
parentsisu-0.55.2 md5s, and cosmetic fix to debian/copyright (diff)
parentcgi search form worked on and presentation, (an info button added and used) (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v0/plaintext.rb')
-rw-r--r--lib/sisu/v0/plaintext.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sisu/v0/plaintext.rb b/lib/sisu/v0/plaintext.rb
index 4bff976a..f08a0871 100644
--- a/lib/sisu/v0/plaintext.rb
+++ b/lib/sisu/v0/plaintext.rb
@@ -327,7 +327,8 @@ WOK
end
para.gsub!(/<:p[bn]>/,'') # remove page breaks
para.gsub!(/^\s*<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/,'') # remove empty lines - check
- para.gsub!(/(^|\s)(https?:\/\/[^"><]+?)([,.:;"><]?(?:\s|$))/,"\\1#{@url_brace.txt_open}\\2#{@url_brace.txt_close}\\3")
+ para.gsub!(/(^|\s)((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([.,]?(?:\s|$))/,"\\1#{@url_brace.txt_open}\\2#{@url_brace.txt_close}\\3")
+ para.gsub!(/(^|\s)[_\\]((?:https?|ftp):\/\/\S+?\.[^'"><\s]+?)([.,]?(?:\s|$))/,'\1\2\3')
para.gsub!(/<a href=".+?">(.+?)<\/a>/m,'\1')
para.gsub!(/<:name#\S+?>/,'') # remove name links
para.gsub!(/&nbsp;/,' ') # decide on