mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
parent
f657dfddf6
commit
b481c58851
1 changed files with 7 additions and 3 deletions
|
@ -15,13 +15,17 @@ module Docs
|
|||
css('#manual-nav a').each_with_object [] do |node, entries|
|
||||
case node.content
|
||||
when /type\ (\w+)/
|
||||
name = $1
|
||||
name = "#{$1} (#{self.name})"
|
||||
when /func\ (?:\(.+\)\ )?(\w+)\(/
|
||||
name = "#{$1}()"
|
||||
name = "#{$1}() (#{self.name})"
|
||||
name.prepend "#{$1}." if node['href'] =~ /#(\w+)\.#{$1}/
|
||||
when 'Constants'
|
||||
name = "#{self.name} constants"
|
||||
when 'Variables'
|
||||
name = "#{self.name} variables"
|
||||
end
|
||||
|
||||
entries << ["#{name} (#{self.name})", node['href'][1..-1]] if name
|
||||
entries << [name, node['href'][1..-1]] if name
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue