History

Add aliases to Lo-Dash documentation

Fixes #68.

Thibaut committed 12 years ago

Commit 0699fee1 parent c93adea3 files · +9 −3Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/lodash/entries.rb +6 −0
  3. lib/docs/scrapers/lodash.rb +2 −2
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -189,7 +189,7 @@ credits = [ · 188 unmodified lines
189189 'http://creativecommons.org/licenses/by/3.0/'
190190 ], [
191191 'Lo-Dash',
192− '2009-2013 The Dojo Foundation',
192+ '2009-2014 The Dojo Foundation',
193193 'MIT',
194194 'https://raw.github.com/lodash/lodash/master/LICENSE.txt'
195195 ], [
lib/docs/filters/lodash/entries.rb+6−0
@@ -12,6 +12,12 @@ module Docs · 11 unmodified lines
1212 name = heading.content
1313 name.sub! %r{\(.+?\)}, '()'
1414 entries << [name, heading['id'], type]
15+
16+ if h4 = heading.parent.at_css('h4') and h4.content.strip == 'Aliases'
17+ h4.next_element.content.split(',').each do |n|
18+ entries << ["#{n.strip}()", heading['id'], type]
19+ end
20+ end
1521 end
1622 end
1723
lib/docs/scrapers/lodash.rb+2−2
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
44 self.slug = 'lodash'
55 self.type = 'lodash'
66 self.version = '2.4.1'
7− self.base_url = 'http://lodash.com/docs'
7+ self.base_url = 'https://lodash.com/docs'
88
99 html_filters.push 'lodash/clean_html', 'lodash/entries', 'title'
1010
@@ -13,7 +13,7 @@ module Docs · 2 unmodified lines
1313 options[:skip_links] = true
1414
1515 options[:attribution] = <<-HTML
16− &copy; 2012&ndash;2013 The Dojo Foundation<br>
16+ &copy; 2012&ndash;2014 The Dojo Foundation<br>
1717 Licensed under the MIT License.
1818 HTML
1919 end