File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ class CleanHtmlFilter < Filter
4
4
def call
5
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
12
css ( 'div.highlighter-rouge' ) . each do |node |
8
13
lang = node [ 'class' ] [ /language-(\w +)/ , 1 ]
9
14
node [ 'data-language' ] = lang if lang
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ module Docs
2
2
class Homebrew
3
3
class EntriesFilter < Docs ::EntriesFilter
4
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
7
name . remove! %r{\( .*}
7
8
name
8
9
end
@@ -16,6 +17,7 @@ def get_name
16
17
Python-for-Formula-Authors
17
18
Migrating-A-Formula-To-A-Tap
18
19
Rename-A-Formula
20
+ Building-Against-Non-Homebrew-Dependencies
19
21
How-to-Create-and-Maintain-a-Tap
20
22
Brew-Test-Bot
21
23
Prose-Style-Guidelines )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ module Docs
2
2
class Homebrew < UrlScraper
3
3
self . name = 'Homebrew'
4
4
self . type = 'simple'
5
- self . release = '1.8.1 '
5
+ self . release = '2.1.9 '
6
6
self . base_url = 'https://docs.brew.sh/'
7
7
self . links = {
8
8
home : 'https://brew.sh' ,
You can’t perform that action at this time.
0 commit comments