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(-) 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