Skip to content

Commit

Permalink
Update documentation.cr
Browse files Browse the repository at this point in the history
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
  • Loading branch information
nobodywasishere and Sija authored Jun 13, 2024
1 parent 898ad17 commit d3b5bf6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/compiler/crystal/tools/documentation.cr
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ module Crystal
def visit(node : Call)
return contains_target(node) unless node.location && @target_location.between?(node.name_location, node.name_end_location)

if target_defs = node.target_defs
target_defs.each do |target_def|
if doc = target_def.doc
@documentations << {doc, target_def.location.not_nil!}
end
node.target_defs.try &.each do |target_def|
if doc = target_def.doc
@documentations << {doc, target_def.location.not_nil!}
end
end
false
Expand Down

0 comments on commit d3b5bf6

Please sign in to comment.