Unified · Split
| @@ -22,14 +22,18 @@ module Docs · 21 unmodified lines | ||
| 22 | 22 | entries = [] |
| 23 | 23 | |
| 24 | 24 | css('h3[id]').each do |node| |
| 25 | − next if node['id'] == 'index_' | |
| 25 | + id = node['id'] | |
| 26 | + next if id == 'index_' | |
| 27 | + | |
| 28 | + id.sub!('%24', '$') | |
| 29 | + node['id'] = id | |
| 26 | 30 | |
| 27 | 31 | name = node.content.strip |
| 28 | 32 | name.sub! %r{\(.+\)}, '()' |
| 29 | 33 | next if name.include?(' ') |
| 30 | 34 | |
| 31 | 35 | type = name.split(/[#\.\(]/).first |
| 32 | − entries << [name, node['id'], type] | |
| 36 | + entries << [name, id, type] | |
| 33 | 37 | end |
| 34 | 38 | |
| 35 | 39 | entries |
| @@ -2,10 +2,14 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Mongoose < UrlScraper |
| 3 | 3 | self.name = 'Mongoose' |
| 4 | 4 | self.type = 'mongoose' |
| 5 | − self.version = '3.8.19' | |
| 5 | + self.version = '4.0.3' | |
| 6 | 6 | self.base_url = 'http://mongoosejs.com/docs/' |
| 7 | 7 | self.root_path = 'index.html' |
| 8 | 8 | self.initial_paths = %w(guide.html api.html) |
| 9 | + self.links = { | |
| 10 | + home: 'http://mongoosejs.com/', | |
| 11 | + code: 'https://github.com/Automattic/mongoose' | |
| 12 | + } | |
| 9 | 13 | |
| 10 | 14 | html_filters.push 'mongoose/clean_html', 'mongoose/entries' |
| 11 | 15 | |