Skip to content

Commit

Permalink
Strip 'file ' prefix from all filenames in RdocToYard (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
grncdr authored Dec 8, 2022
1 parent caf6bcb commit b8484cb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/solargraph/yard_map/rdoc_to_yard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,14 @@ def self.locate obj
end

def self.find_file obj
if obj.respond_to?(:in_files) && !obj.in_files.empty?
[obj.in_files.first.to_s.sub(/^file /, ''), obj.line]
file = if obj.respond_to?(:in_files) && !obj.in_files.empty?
obj.in_files.first
else
[obj.file, obj.line]
obj.file
end

file = file.to_s.sub(/^file /, '') unless file.nil?
[file, obj.line]
end
end
end
Expand Down

0 comments on commit b8484cb

Please sign in to comment.