Browse Source

Improve Underscore.js entry names

Thibaut 10 years ago
parent
commit
98c61d8e2d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/docs/filters/underscore/entries.rb

+ 3 - 0
lib/docs/filters/underscore/entries.rb

@@ -14,7 +14,10 @@ module Docs
 
           # Method
           node.css('.header', '.alias b').each do |header|
+            prefix = header.ancestors('p').first.at_css('code').content[/\A[^\.]+\./].strip
             header.content.split(',').each do |name|
+              name.strip!
+              name.prepend(prefix)
               entries << [name, node['id'], type]
             end
           end