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.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sisu/v0/wikispeak.rb b/lib/sisu/v0/wikispeak.rb
index 967387d9..d9cb3cbd 100644
--- a/lib/sisu/v0/wikispeak.rb
+++ b/lib/sisu/v0/wikispeak.rb
@@ -105,7 +105,7 @@ module SiSU_Wikispeak
attr_reader :format,:lev,:text,:ocn,:lev_para_ocn
def initialize(para)
@para=para
- @format,@ocn='null','null'
+ @format,@ocn='ordinary','ordinary'
@dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern
end
def lev_segname_para_ocn
@@ -253,16 +253,16 @@ 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
para.gsub!(/^\s*#{Mx[:id_o]}~\d+;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/,'') # remove empty lines - check
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!(/&nbsp;|#{Mx[:nbsp]}/,' ') # decide on
+ 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