aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-05-18 20:51:03 -0400
committerRalph Amissah <ralph@amissah.com>2010-05-18 20:51:03 -0400
commit176af37040fd295ec334f7272b429dc9c4edfec6 (patch)
tree0a3a2855a905ec399580ed84e48aa49303c5e035
parentdal_syntax, url match fix (diff)
dal_doc_str, name tags fix
-rw-r--r--lib/sisu/v2/dal_doc_str.rb6
1 files 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?