Explorar el Código

Improve Underscore.js entry names

Thibaut hace 10 años
padre
commit
98c61d8e2d
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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