Update lodash documentation (4.16.2, 3.10.1, 2.4.2)

pull/501/head
Thibaut Courouble 8 years ago
parent 2acc13793c
commit 41d648144c

@ -163,6 +163,13 @@
}
}
._heading-links {
float: right;
font-weight: normal;
> a + a { margin-left: .25rem; }
}
//
// Table of contents
//

@ -90,6 +90,7 @@
margin: 2em 0 1em;
padding-left: .5em;
padding-right: .5em;
overflow: hidden;
font-size: inherit;
color: $boxHeaderColor;
border: 1px solid $boxBorder;

@ -2,21 +2,26 @@ module Docs
class Lodash
class CleanHtmlFilter < Filter
def call
@doc = at_css('h1+div+div')
@doc = at_css('.doc-container')
css('h3 + p', 'hr').remove
css('h2 a:contains("#")', 'h3 a:contains("#")').remove
css('> div', '> div > div', '.highlight').each do |node|
node.before(node.children).remove
end
# Remove <code> inside headings
css('h2', 'h3').each do |node|
node.content = node.content
end
css('h3 + p > a:first-child').each do |node|
node.parent.previous_element << %(<div class="_heading-links">#{node.parent.inner_html}</div>)
node.parent.remove
end
# Remove code highlighting
css('pre').each do |node|
node.inner_html = node.inner_html.gsub('<br>', "\n").gsub('&nbsp;', ' ')
node.content = node.content
node.inner_html = node.inner_html.gsub('</div>', "</div>\n").gsub('&nbsp;', ' ')
node.content = node.content.strip
node['data-language'] = 'javascript'
end

@ -9,7 +9,7 @@ module Docs
heading.parent.css('a').each do |link|
name = link.content
name = name.remove(/\u{279C}.*/)
name.remove! %r{\s.*}
entries << [name, link['href'].remove('#'), type]
end
end

@ -19,13 +19,18 @@ module Docs
HTML
version '4' do
self.release = '4.15.0'
self.base_url = 'https://lodash.com/docs'
self.release = '4.16.2'
self.base_url = "https://lodash.com/docs/#{release}"
end
version '3' do
self.release = '3.10.0'
self.base_url = 'https://lodash.com/docs' # OUT-OF-DATE
self.release = '3.10.1'
self.base_url = "https://lodash.com/docs/#{release}"
end
version '2' do
self.release = '2.4.2'
self.base_url = "https://lodash.com/docs/#{release}"
end
end
end

Loading…
Cancel
Save