aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/wikispeak.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/wikispeak.rb')
-rw-r--r--lib/sisu/v0/wikispeak.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sisu/v0/wikispeak.rb b/lib/sisu/v0/wikispeak.rb
index 967387d9..2b0ba560 100644
--- a/lib/sisu/v0/wikispeak.rb
+++ b/lib/sisu/v0/wikispeak.rb
@@ -253,7 +253,7 @@ WOK
para.gsub!(/<i>(.+?)<\/i>/,"''\\1''")
para.gsub!(/<b>(.+?)<\/b>/,"'''\\1'''")
para.gsub!(/<u>(.+?)<\/u>/,'_\1_')
- para.gsub!(/\{(.+?)\}(https?:\/\/\S+)/,'[\2 \1]')
+ para.gsub!(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}(https?:\/\/\S+)/,'[\2 \1]')
para.gsub!(/(https?:\/\/\S+)/,'[\1]')
para.gsub!(/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+#{Mx[:id_o]}~(\d+);(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]})?/,'')
para.gsub!(/<:p[bn]>/,'') # remove page breaks
@@ -261,8 +261,8 @@ WOK
para.gsub!(/<a href=".+?">(.+?)<\/a>/m,'\1')
para.gsub!(/<:name#\S+?>/,'') # remove name links
para.gsub!(/&nbsp;/,' ') # decide on
- para.gsub!(/(?:^|[^_\\])\{(\S+?\.(?:png|jpg|gif)) .+?\}(?:(?:https?|file|ftp):\/\/\S+|image)/,' [ \1 ]') #"[ #{dir.url.images_local}\/\\1 ]")
- para.gsub!(/(?:^|[^_\\])\{\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,'[image: "\1"]')
+ para.gsub!(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}(?:(?:https?|file|ftp):\/\/\S+|image)/,' [ \1 ]') #"[ #{dir.url.images_local}\/\\1 ]")
+ para.gsub!(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*#{Mx[:lnk_c]}\S+/,'[image: "\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