allow linking to a object definition in the api docs
For example to link to the collection item description: Each collection contains many {api:collections:Collection+Item Collection Items}. Change-Id: I633645be9e12481aa21e6c03d876ee159ec6437d Reviewed-on: https://gerrit.instructure.com/11775 Reviewed-by: Ryan Florence <ryanf@instructure.com> Tested-by: Jenkins <jenkins@instructure.com>
This commit is contained in:
parent
14e1aae4be
commit
c86323825e
|
@ -37,6 +37,8 @@ module YARD::Templates::Helpers::BaseHelper
|
|||
else
|
||||
raise "couldn't find API link for #{args.first}"
|
||||
end
|
||||
elsif args.first.is_a?(String) && args.first =~ %r{^api:([^:]+):(.*)}
|
||||
link_url("#{$1.downcase}.html##{$2.gsub('+', ' ')}", args[1])
|
||||
else
|
||||
linkify_without_api(*args)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue