diff options
Diffstat (limited to 'lib/sisu/v0/wikispeak.rb')
-rw-r--r-- | lib/sisu/v0/wikispeak.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sisu/v0/wikispeak.rb b/lib/sisu/v0/wikispeak.rb index bcc2da04..a0ca2cd5 100644 --- a/lib/sisu/v0/wikispeak.rb +++ b/lib/sisu/v0/wikispeak.rb @@ -249,15 +249,15 @@ WOK para.gsub!(/<i>(.+?)<\/i>/,"''\\1''") para.gsub!(/<b>(.+?)<\/b>/,"'''\\1'''") para.gsub!(/<u>(.+?)<\/u>/,'_\1_') - para.gsub!(/\{(.+?)\}(http:\/\/\S+)/,'[\2 \1]') - para.gsub!(/(http:\/\/\S+)/,'[\1]') + para.gsub!(/\{(.+?)\}(https?:\/\/\S+)/,'[\2 \1]') + para.gsub!(/(https?:\/\/\S+)/,'[\1]') para.gsub!(/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)?/,'') 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!(/<a href=".+?">(.+?)<\/a>/m,'\1') para.gsub!(/<:name#\S+?>/,'') # remove name links para.gsub!(/ /,' ') # decide on - para.gsub!(/\{(\S+?\.(?:png|jpg|gif)) .+?\}(?:(?:https?|ftp):\/\/\S+|image)/,' [ \1 ]') #"[ #{dir.url.images_local}\/\\1 ]") + para.gsub!(/\{(\S+?\.(?:png|jpg|gif)) .+?\}(?:(?:https?|file|ftp):\/\/\S+|image)/,' [ \1 ]') #"[ #{dir.url.images_local}\/\\1 ]") para.gsub!(/^\{\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,'[image: "\1"]') wordlist=para.scan(/\S+/) if para =~/^0~(\S+)\s+(.+?)\Z/m # for headers |