soywiki 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/soywiki-rename +4 -2
  2. data/lib/soywiki.rb +1 -1
  3. 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
- text = text.gsub(RELATIVE_LINK_REGEX, oldname.namespace + '.\1')
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
@@ -1,7 +1,7 @@
1
1
  require 'string_ext'
2
2
 
3
3
  module Soywiki
4
- VERSION = '0.4.8'
4
+ VERSION = '0.4.9'
5
5
  WIKI_WORD = /\b([a-z][\w_]+\.)?[A-Z][a-z]+[A-Z]\w*\b/
6
6
  HYPERLINK = %r|\bhttps?://[^ >)\n\]]+|
7
7
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 8
9
- version: 0.4.8
8
+ - 9
9
+ version: 0.4.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi