soywiki 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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