File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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' ,
You can’t perform that action at this time.
0 commit comments