Update Homebrew to 2.0.1 (#978)

Update Homebrew to 2.0.1

Co-authored-by: Jasper van Merle <jaspervmerle@gmail.com>
pull/1036/head
Jasper van Merle 6 years ago committed by GitHub
commit 5f5ac5bfc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,6 +4,11 @@ module Docs
def call
css('hr')
if at_css('h1').nil?
title = current_url.normalized_path[1..-1].gsub(/-/, ' ')
doc.children.before("<h1>#{title}</h1>")
end
css('div.highlighter-rouge').each do |node|
lang = node['class'][/language-(\w+)/, 1]
node['data-language'] = lang if lang

@ -2,7 +2,8 @@ module Docs
class Homebrew
class EntriesFilter < Docs::EntriesFilter
def get_name
name = at_css('h1').content.strip
header = at_css('h1')
name = header.nil? ? current_url.normalized_path[1..-1].gsub(/-/, ' ') : header.content.strip
name.remove! %r{\(.*}
name
end
@ -16,6 +17,7 @@ module Docs
Python-for-Formula-Authors
Migrating-A-Formula-To-A-Tap
Rename-A-Formula
Building-Against-Non-Homebrew-Dependencies
How-to-Create-and-Maintain-a-Tap
Brew-Test-Bot
Prose-Style-Guidelines)

@ -2,7 +2,7 @@ module Docs
class Homebrew < UrlScraper
self.name = 'Homebrew'
self.type = 'simple'
self.release = '1.8.1'
self.release = '2.1.9'
self.base_url = 'https://docs.brew.sh/'
self.links = {
home: 'https://brew.sh',

Loading…
Cancel
Save