History

Improve Underscore.js entry names

Thibaut committed 11 years ago

Commit 98c61d81 parent 2b4ae821 file · +3 −0Browse files

Unified · Split

lib/docs/filters/underscore/entries.rb+3−0
@@ -14,7 +14,10 @@ module Docs · 13 unmodified lines
14 14
15 # Method15 # Method
16 node.css('.header', '.alias b').each do |header|16 node.css('.header', '.alias b').each do |header|
17 prefix = header.ancestors('p').first.at_css('code').content[/\A[^\.]+\./].strip
17 header.content.split(',').each do |name|18 header.content.split(',').each do |name|
19 name.strip!
20 name.prepend(prefix)
18 entries << [name, node['id'], type]21 entries << [name, node['id'], type]
19 end22 end
20 end23 end