soywiki 0.4.8 → 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/soywiki-rename +4 -2
- data/lib/soywiki.rb +1 -1
- metadata +2 -2
data/bin/soywiki-rename
CHANGED
@@ -50,8 +50,10 @@ def absolutize_unqualified_outbound_links(oldname, newname)
|
|
50
50
|
if File.exist?(target_file)
|
51
51
|
text = File.read(target_file)
|
52
52
|
begin
|
53
|
-
matches = text.scan(RELATIVE_LINK_REGEX)
|
54
|
-
|
53
|
+
matches = text.scan(RELATIVE_LINK_REGEX).select {|match| File.exist?( oldname.namespace + ".#{match}" ) }
|
54
|
+
matches.each do |match|
|
55
|
+
text = text.gsub(match, oldname.namespace + '.\1')
|
56
|
+
end
|
55
57
|
File.open(target_file, 'w') {|f| f.puts text}
|
56
58
|
MEMO << " - In file #{target_file}: Absolutized these unqualified links: #{matches.inspect}"
|
57
59
|
rescue
|
data/lib/soywiki.rb
CHANGED