History

Update Express.js documentation (4.10.0)

Thibaut committed 12 years ago

Commit 79e876a1 parent a90077c2 files · +8 −2Browse files

Unified · Split

2 files
  1. lib/docs/filters/express/clean_html.rb +6 −0
  2. lib/docs/scrapers/express.rb +2 −2
lib/docs/filters/express/clean_html.rb+6−0
@@ -2,6 +2,8 @@ module Docs · 1 unmodified line
2 class Express2 class Express
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 at_css('h1').remove
6
5 css('section').each do |node|7 css('section').each do |node|
6 node.before(node.children).remove8 node.before(node.children).remove
7 end9 end
@@ -12,6 +14,10 @@ module Docs · 4 unmodified lines
12 node.remove14 node.remove
13 end15 end
14 16
17 css('table[border]').each do |node|
18 node.remove_attribute 'border'
19 end
20
15 # Remove code highlighting21 # Remove code highlighting
16 css('pre').each do |node|22 css('pre').each do |node|
17 node.content = node.content23 node.content = node.content
lib/docs/scrapers/express.rb+2−2
@@ -2,13 +2,13 @@ module Docs · 1 unmodified line
2 class Express < UrlScraper2 class Express < UrlScraper
3 self.name = 'Express'3 self.name = 'Express'
4 self.type = 'express'4 self.type = 'express'
5 self.version = '4.9.7'5 self.version = '4.10.0'
6 self.base_url = 'http://expressjs.com/4x/api.html'6 self.base_url = 'http://expressjs.com/4x/api.html'
7 7
8 html_filters.push 'express/clean_html', 'express/entries', 'title'8 html_filters.push 'express/clean_html', 'express/entries', 'title'
9 9
10 options[:title] = 'Express'10 options[:title] = 'Express'
11 options[:container] = '#right'11 options[:container] = '#api-doc'
12 options[:skip_links] = true12 options[:skip_links] = true
13 13
14 options[:attribution] = <<-HTML14 options[:attribution] = <<-HTML