aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
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 /lib
parentnote on debian vim dealings (diff)
matching of multiple urls within paragraph, fix
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v0/db_import.rb2
-rw-r--r--lib/sisu/v0/shared_html_lite.rb2
2 files changed, 2 insertions, 2 deletions
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