Skip to content

Commit 08de77b

Browse files
authored
Merge pull request #47 from studiolift/fix_greedy_shortened_filename
Fix greedy shortened_filename replace
2 parents f2a0683 + 8e4715e commit 08de77b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/simplecov-html.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def timeago(time)
9696
end
9797

9898
def shortened_filename(source_file)
99-
source_file.filename.gsub(SimpleCov.root, ".").gsub(/^\.\//, "")
99+
source_file.filename.sub(SimpleCov.root, ".").gsub(/^\.\//, "")
100100
end
101101

102102
def link_to_source_file(source_file)

0 commit comments

Comments
 (0)