Fix tests and handle touching tags.

This commit is contained in:
Tom Preston-Werner
2010-07-20 22:22:22 -05:00
parent 9d68c4ef8a
commit 8595ca5645
2 changed files with 23 additions and 11 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ module Gollum
#
# Returns the placeholder'd String data.
def extract_tags(data)
data.gsub(/(.?)\[\[(.+?)\]\](.?)/m) do
data.gsub(/(.?)\[\[(.+?)\]\]([^\[]?)/m) do
if $1 == "'" && $3 != "'"
"[[#{$2}]]#{$3}"
elsif $2.include?('][')