Update Homebrew to 2.0.1
Unified · Split
| @@ -4,6 +4,11 @@ module Docs · 3 unmodified lines | |||
| 4 | def call | 4 | def call |
| 5 | css('hr') | 5 | css('hr') |
| 6 | 6 | ||
| 7 | if at_css('h1').nil? | ||
| 8 | title = current_url.normalized_path[1..-1].gsub(/-/, ' ') | ||
| 9 | doc.children.before("<h1>#{title}</h1>") | ||
| 10 | end | ||
| 11 | |||
| 7 | css('div.highlighter-rouge').each do |node| | 12 | css('div.highlighter-rouge').each do |node| |
| 8 | lang = node['class'][/language-(\w+)/, 1] | 13 | lang = node['class'][/language-(\w+)/, 1] |
| 9 | node['data-language'] = lang if lang | 14 | node['data-language'] = lang if lang |
| @@ -2,7 +2,8 @@ module Docs · 1 unmodified line | |||
| 2 | class Homebrew | 2 | class Homebrew |
| 3 | class EntriesFilter < Docs::EntriesFilter | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | def get_name | 4 | def get_name |
| 5 | name = at_css('h1').content.strip | 5 | header = at_css('h1') |
| 6 | name = header.nil? ? current_url.normalized_path[1..-1].gsub(/-/, ' ') : header.content.strip | ||
| 6 | name.remove! %r{\(.*} | 7 | name.remove! %r{\(.*} |
| 7 | name | 8 | name |
| 8 | end | 9 | end |
| @@ -16,6 +17,7 @@ module Docs · 7 unmodified lines | |||
| 16 | Python-for-Formula-Authors | 17 | Python-for-Formula-Authors |
| 17 | Migrating-A-Formula-To-A-Tap | 18 | Migrating-A-Formula-To-A-Tap |
| 18 | Rename-A-Formula | 19 | Rename-A-Formula |
| 20 | Building-Against-Non-Homebrew-Dependencies | ||
| 19 | How-to-Create-and-Maintain-a-Tap | 21 | How-to-Create-and-Maintain-a-Tap |
| 20 | Brew-Test-Bot | 22 | Brew-Test-Bot |
| 21 | Prose-Style-Guidelines) | 23 | Prose-Style-Guidelines) |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | |||
| 2 | class Homebrew < UrlScraper | 2 | class Homebrew < UrlScraper |
| 3 | self.name = 'Homebrew' | 3 | self.name = 'Homebrew' |
| 4 | self.type = 'simple' | 4 | self.type = 'simple' |
| 5 | self.release = '1.8.1' | 5 | self.release = '2.1.9' |
| 6 | self.base_url = 'https://docs.brew.sh/' | 6 | self.base_url = 'https://docs.brew.sh/' |
| 7 | self.links = { | 7 | self.links = { |
| 8 | home: 'https://brew.sh', | 8 | home: 'https://brew.sh', |