diff --git a/assets/stylesheets/pages/_laravel.scss b/assets/stylesheets/pages/_laravel.scss index d3b11bd0..cf9e11eb 100644 --- a/assets/stylesheets/pages/_laravel.scss +++ b/assets/stylesheets/pages/_laravel.scss @@ -4,5 +4,6 @@ h4 { font-size: 1em; } blockquote { @extend %note; } - p > code { @extend %label; } + blockquote.tip { @extend %note-blue; } + p > code, h4 > code { @extend %label; } } diff --git a/lib/docs/filters/laravel/clean_html.rb b/lib/docs/filters/laravel/clean_html.rb index d2585b81..c2317f8b 100644 --- a/lib/docs/filters/laravel/clean_html.rb +++ b/lib/docs/filters/laravel/clean_html.rb @@ -14,6 +14,10 @@ module Docs node['data-language'] = 'php' end + css('a.__cf_email__').each do |node| + node.replace(decode_cloudflare_email(node['data-cfemail'])) + end + doc end @@ -67,8 +71,9 @@ module Docs node.parent.next_element['id'] = node['name'] end - css('a.__cf_email__').each do |node| - node.replace(decode_cloudflare_email(node['data-cfemail'])) + css('blockquote').each do |node| + node['class'] = 'tip' if node.inner_html.include?('{tip}') + node.inner_html = node.inner_html.remove(/\{(tip|note)\}\s?/) end end end diff --git a/lib/docs/scrapers/laravel.rb b/lib/docs/scrapers/laravel.rb index da6f21a1..c37ef953 100644 --- a/lib/docs/scrapers/laravel.rb +++ b/lib/docs/scrapers/laravel.rb @@ -33,6 +33,19 @@ module Docs Laravel is a trademark of Taylor Otwell. HTML + version '5.3' do + self.release = '5.3.0' + self.root_path = '/api/5.3/index.html' + self.initial_paths = %w(/docs/5.3/installation /api/5.3/classes.html) + + options[:only_patterns] = [%r{\A/api/5\.3/}, %r{\A/docs/5\.3/}] + + options[:fix_urls] = ->(url) do + url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/5.3/" + url + end + end + version '5.2' do self.release = '5.2.31' self.root_path = '/api/5.2/index.html'