[devdocsgjs/main: 717/1867] Update version and filter
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 717/1867] Update version and filter
- Date: Fri, 19 Nov 2021 23:47:25 +0000 (UTC)
commit 7ad7247878a9e8d5c1dd4fbf4a7e1b5a542eac8c
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Mon Aug 5 13:18:53 2019 +0200
Update version and filter
lib/docs/filters/homebrew/clean_html.rb | 5 +++++
lib/docs/filters/homebrew/entries.rb | 4 +++-
lib/docs/scrapers/homebrew.rb | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/lib/docs/filters/homebrew/clean_html.rb b/lib/docs/filters/homebrew/clean_html.rb
index 5bf6aa29..6a81a5c6 100644
--- a/lib/docs/filters/homebrew/clean_html.rb
+++ b/lib/docs/filters/homebrew/clean_html.rb
@@ -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
diff --git a/lib/docs/filters/homebrew/entries.rb b/lib/docs/filters/homebrew/entries.rb
index 03650ad9..c698cf72 100644
--- a/lib/docs/filters/homebrew/entries.rb
+++ b/lib/docs/filters/homebrew/entries.rb
@@ -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)
diff --git a/lib/docs/scrapers/homebrew.rb b/lib/docs/scrapers/homebrew.rb
index faf46a76..5743735f 100644
--- a/lib/docs/scrapers/homebrew.rb
+++ b/lib/docs/scrapers/homebrew.rb
@@ -2,7 +2,7 @@ module Docs
class Homebrew < UrlScraper
self.name = 'Homebrew'
self.type = 'simple'
- self.release = '2.0.1'
+ self.release = '2.1.9'
self.base_url = 'https://docs.brew.sh/'
self.links = {
home: 'https://brew.sh',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]