aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/ao_doc_str.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/ao_doc_str.rb')
-rw-r--r--lib/sisu/v6/ao_doc_str.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sisu/v6/ao_doc_str.rb b/lib/sisu/v6/ao_doc_str.rb
index 0cdd553b..d8c012fd 100644
--- a/lib/sisu/v6/ao_doc_str.rb
+++ b/lib/sisu/v6/ao_doc_str.rb
@@ -163,10 +163,13 @@ module SiSU_AO_DocumentStructureExtract
str=str.gsub(/(^|[ ])\*~([a-z0-9._-]+)(?=[ #{Mx[:br_nl]}]|$)/i,
"\\1#{Mx[:tag_o]}\\2#{Mx[:tag_c]}").
gsub(/ [ ]+/i,' ')
- tags=str.scan(/#{Mx[:tag_o]}(\S+?)#{Mx[:tag_c]}/).flatten
+ tags=str.scan(/#{Mx[:tag_o]}(\S+?)#{Mx[:tag_c]}/).flatten.uniq
str=str.gsub(/[ ]?#{Mx[:tag_o]}\S+?#{Mx[:tag_c]}[ ]?/,' ') #may be issues with spaces would leave one, but "code" blocks?
end
tags=nametag ? (tags << nametag) : tags
+ tags.each do |t|
+ t.gsub!(/[^a-z0-9._-]/,'')
+ end
end
[str,tags]
end