From 0cc5933b7e3a73178b9ed13f5fa02d4c67fdb8c8 Mon Sep 17 00:00:00 2001 From: TK Lai Date: Sun, 14 May 2023 12:40:29 +0800 Subject: [PATCH] laravel: fix "Docs::Entry::Invalid: missing type" on doc:generate --- lib/docs/scrapers/laravel.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/docs/scrapers/laravel.rb b/lib/docs/scrapers/laravel.rb index 348e95dd..a104f06b 100644 --- a/lib/docs/scrapers/laravel.rb +++ b/lib/docs/scrapers/laravel.rb @@ -65,6 +65,7 @@ module Docs options[:only_patterns] = [%r{\A/api/8\.x/}, %r{\A/docs/8\.x/}] options[:fix_urls] = ->(url) do + url.sub! %r{8.x/+}, "8.x/" url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/8.x/" url end @@ -78,6 +79,7 @@ module Docs options[:only_patterns] = [%r{\A/api/7\.x/}, %r{\A/docs/7\.x/}] options[:fix_urls] = ->(url) do + url.sub! %r{7.x/+}, "7.x/" url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/7.x/" url end @@ -91,6 +93,7 @@ module Docs options[:only_patterns] = [%r{\A/api/6\.x/}, %r{\A/docs/6\.x/}] options[:fix_urls] = ->(url) do + url.sub! %r{6.x/+}, "6.x/" url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/6.x/" url end