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
189 'http://creativecommons.org/licenses/by/3.0/'189 'http://creativecommons.org/licenses/by/3.0/'
190 ], [190 ], [
191 'Lo-Dash',191 'Lo-Dash',
192 '2009-2013 The Dojo Foundation',192 '2009-2014 The Dojo Foundation',
193 'MIT',193 'MIT',
194 'https://raw.github.com/lodash/lodash/master/LICENSE.txt'194 'https://raw.github.com/lodash/lodash/master/LICENSE.txt'
195 ], [195 ], [
lib/docs/filters/lodash/entries.rb+6−0
@@ -12,6 +12,12 @@ module Docs · 11 unmodified lines
12 name = heading.content12 name = heading.content
13 name.sub! %r{\(.+?\)}, '()'13 name.sub! %r{\(.+?\)}, '()'
14 entries << [name, heading['id'], type]14 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
15 end21 end
16 end22 end
17 23
lib/docs/scrapers/lodash.rb+2−2
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
4 self.slug = 'lodash'4 self.slug = 'lodash'
5 self.type = 'lodash'5 self.type = 'lodash'
6 self.version = '2.4.1'6 self.version = '2.4.1'
7 self.base_url = 'http://lodash.com/docs'7 self.base_url = 'https://lodash.com/docs'
8 8
9 html_filters.push 'lodash/clean_html', 'lodash/entries', 'title'9 html_filters.push 'lodash/clean_html', 'lodash/entries', 'title'
10 10
@@ -13,7 +13,7 @@ module Docs · 2 unmodified lines
13 options[:skip_links] = true13 options[:skip_links] = true
14 14
15 options[:attribution] = <<-HTML15 options[:attribution] = <<-HTML
16 &copy; 2012&ndash;2013 The Dojo Foundation<br>16 &copy; 2012&ndash;2014 The Dojo Foundation<br>
17 Licensed under the MIT License.17 Licensed under the MIT License.
18 HTML18 HTML
19 end19 end