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
1414
1515 # Method
1616 node.css('.header', '.alias b').each do |header|
17+ prefix = header.ancestors('p').first.at_css('code').content[/\A[^\.]+\./].strip
1718 header.content.split(',').each do |name|
19+ name.strip!
20+ name.prepend(prefix)
1821 entries << [name, node['id'], type]
1922 end
2023 end