aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-07-24 01:55:42 +0100
committerRalph Amissah <ralph@amissah.com>2007-07-24 01:55:42 +0100
commit55d549807a443531fdd20d61d90078e3b5638abc (patch)
treefa1315850955894a8155309cef9728bed3a085bb
parentnote on debian vim dealings (diff)
matching of multiple urls within paragraph, fix
-rw-r--r--CHANGELOG2
-rw-r--r--lib/sisu/v0/db_import.rb2
-rw-r--r--lib/sisu/v0/shared_html_lite.rb2
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