History

Add aliases to Lo-Dash documentation

Fixes #68.

Thibaut committed 12 years ago

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

Showing the changes to lib/docs (2 of 3 files). Show all

Unified · Split

2 files
  1. lib/docs/filters/lodash/entries.rb +6 −0
  2. lib/docs/scrapers/lodash.rb +2 −2
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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t