History

Minor fix to Knockout documentation

Phil Scherer committed 5 years ago

Commit 22724921 parent 86eb7251 file · +6 −3Browse files

Unified · Split

lib/docs/filters/knockout/entries.rb+6−3
@@ -18,6 +18,7 @@ module Docs · 17 unmodified lines
1818 name = at_css('h1').content.strip
1919 name.remove! 'The '
2020 name.sub! %r{"(.+?)"}, '\1'
21+ name.sub! %r{"(.+?)"}, '\1'
2122 name.gsub!(/ [A-Z]/) { |str| str.downcase! }
2223 name
2324 end
@@ -27,10 +28,12 @@ module Docs · 3 unmodified lines
2728 'Observables'
2829 elsif slug =~ /component/i
2930 'Components'
30− elsif slug.include?('binding') && !name.end_with?('binding')
31− 'Binding'
3231 elsif slug.include? 'binding'
33− 'Bindings'
32+ if at_css('#purpose')
33+ 'Bindings'
34+ else
35+ 'Binding'
36+ end
3437 elsif slug.include? 'plugin'
3538 'Plugins'
3639 else