Przeglądaj źródła

Minor fix to Knockout documentation

Phil Scherer 5 lat temu
rodzic
commit
2272492aea
1 zmienionych plików z 6 dodań i 3 usunięć
  1. 6 3
      lib/docs/filters/knockout/entries.rb

+ 6 - 3
lib/docs/filters/knockout/entries.rb

@@ -18,6 +18,7 @@ module Docs
         name = at_css('h1').content.strip
         name.remove! 'The '
         name.sub! %r{"(.+?)"}, '\1'
+        name.sub! %r{"(.+?)"}, '\1'
         name.gsub!(/ [A-Z]/) { |str| str.downcase! }
         name
       end
@@ -27,10 +28,12 @@ module Docs
           'Observables'
         elsif slug =~ /component/i
           'Components'
-        elsif slug.include?('binding') && !name.end_with?('binding')
-          'Binding'
         elsif slug.include? 'binding'
-          'Bindings'
+          if at_css('#purpose')
+            'Bindings'
+          else
+            'Binding'
+          end
         elsif slug.include? 'plugin'
           'Plugins'
         else