Skip to content

Commit 5f5ac5b

Browse files
authored
Update Homebrew to 2.0.1 (#978)
Update Homebrew to 2.0.1 Co-authored-by: Jasper van Merle <[email protected]>
2 parents 836f9e1 + 7ad7247 commit 5f5ac5b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

lib/docs/filters/homebrew/clean_html.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ class CleanHtmlFilter < Filter
44
def call
55
css('hr')
66

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+
712
css('div.highlighter-rouge').each do |node|
813
lang = node['class'][/language-(\w+)/, 1]
914
node['data-language'] = lang if lang

lib/docs/filters/homebrew/entries.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ module Docs
22
class Homebrew
33
class EntriesFilter < Docs::EntriesFilter
44
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
67
name.remove! %r{\(.*}
78
name
89
end
@@ -16,6 +17,7 @@ def get_name
1617
Python-for-Formula-Authors
1718
Migrating-A-Formula-To-A-Tap
1819
Rename-A-Formula
20+
Building-Against-Non-Homebrew-Dependencies
1921
How-to-Create-and-Maintain-a-Tap
2022
Brew-Test-Bot
2123
Prose-Style-Guidelines)

lib/docs/scrapers/homebrew.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Docs
22
class Homebrew < UrlScraper
33
self.name = 'Homebrew'
44
self.type = 'simple'
5-
self.release = '1.8.1'
5+
self.release = '2.1.9'
66
self.base_url = 'https://docs.brew.sh/'
77
self.links = {
88
home: 'https://brew.sh',

0 commit comments

Comments
 (0)