From 7c10db58563e2bd4ede96d33e3e9df16af0214cb Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 18 May 2010 20:49:54 -0400 Subject: dal_syntax, url match fix --- lib/sisu/v2/dal_syntax.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb index c34104c7..9774f7c1 100644 --- a/lib/sisu/v2/dal_syntax.rb +++ b/lib/sisu/v2/dal_syntax.rb @@ -409,7 +409,7 @@ module SiSU_Syntax dob.obj.gsub!(/(#{Mx[:gr_o]}verse#{Mx[:gr_c]}.+)/m,"\\1\n") dob.obj.gsub!(/[ ]+($)/,'\1') dob.obj.gsub!(/\{\s*(.+?)\s*\}(https?:\S+?)([;,.]?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/, - "#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2\\3") #any remaining linked text or image + "#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}#{Mx[:url_o]}\\2#{Mx[:url_c]}\\3") #any remaining linked text or image dob.obj.gsub!(/\{\s*(.+?)\s*\}(#{Mx[:url_o]}\S+?#{Mx[:url_c]})/, "#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #any remaining linked text or image dob.obj.gsub!(/(^|[ ])\{\s*(.+?)\s*\}(\S+?)([;,.]?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/, -- cgit v1.2.3 From 176af37040fd295ec334f7272b429dc9c4edfec6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 18 May 2010 20:51:03 -0400 Subject: dal_doc_str, name tags fix --- lib/sisu/v2/dal_doc_str.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb index 46ae8d3c..a250175b 100644 --- a/lib/sisu/v2/dal_doc_str.rb +++ b/lib/sisu/v2/dal_doc_str.rb @@ -102,9 +102,9 @@ module SiSU_document_structure_extract tags=[] if str.nil? else - if str =~/(?:^|[ ])\*~([a-z0-9._-]+)(?:[ ]|$)/ - str.gsub!(/(^|[ ])\*~([a-z0-9._-]+)([ ]|$)/i, - "\\1#{Mx[:tag_o]}\\2#{Mx[:tag_c]}\\3") + if str =~/(?:^|[ ])\*~([a-z0-9._-]+)(?=[ #{Mx[:br_nl]}]|$)/ + str.gsub!(/(^|[ ])\*~([a-z0-9._-]+)(?=[ #{Mx[:br_nl]}]|$)/i, + "\\1#{Mx[:tag_o]}\\2#{Mx[:tag_c]}") str.gsub!(/ [ ]+/i,' ') tags=str.scan(/#{Mx[:tag_o]}(\S+?)#{Mx[:tag_c]}/).flatten str.gsub!(/[ ]?#{Mx[:tag_o]}\S+?#{Mx[:tag_c]}[ ]?/,' ') #may be issues with spaces would leave one, but "code" blocks? -- cgit v1.2.3