From 55d549807a443531fdd20d61d90078e3b5638abc Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 24 Jul 2007 01:55:42 +0100 Subject: matching of multiple urls within paragraph, fix --- CHANGELOG | 2 ++ lib/sisu/v0/db_import.rb | 2 +- lib/sisu/v0/shared_html_lite.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a791c3f2..bb53e377 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,6 +12,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.6.orig.tar.gz sisu_0.55.6-1.dsc sisu_0.55.6-1.diff.gz + * db html, fix related to match of multiple urls within paragraph + * debian vim * moved vim install back to addons * added recommends vim-addon-manager diff --git a/lib/sisu/v0/db_import.rb b/lib/sisu/v0/db_import.rb index 91360613..5ef26466 100644 --- a/lib/sisu/v0/db_import.rb +++ b/lib/sisu/v0/db_import.rb @@ -125,7 +125,7 @@ module SiSU_DB_import string.gsub!(/<:(?:code|alt|group|verse)(?:-end)?>/,'') string.gsub!(/<:name#\S+?>/,'') string.gsub!(/\{\s*(\S+?\.(?:png|jpg))(?:\s+\d+x\d+)?(.+?)\}\S+/,'[image: \1] \2') - string.gsub!(/\{\s*(.+?)\s*\}http:\/\/\S+?([.,!?]?(?:\s|$))/,'\1\2') + string.gsub!(/\{\s*(.+?)\s*\}https?:\/\/\S+?([.,!?]?(?:\s|$))/,'\1\2') end def unicode_special_character_escape(string) #string.gsub!(/(["';:,])/, %{\\\\\\1}) diff --git a/lib/sisu/v0/shared_html_lite.rb b/lib/sisu/v0/shared_html_lite.rb index 76def67d..50abb284 100644 --- a/lib/sisu/v0/shared_html_lite.rb +++ b/lib/sisu/v0/shared_html_lite.rb @@ -127,7 +127,7 @@ module SiSU_Format_Shared def markup(para) if para =~/\{.+?\}((?:http|ftp)\S+|image)/ @word_mode=para.scan(/\{.+?\}(?:(?:https?|ftp)\S+|image)|\S+/) - word_mode=urls(para) + word_mode=urls(@word_mode) words=word_mode.join(' ') para.gsub!(/.+/,words) end -- cgit v1.2.3