Bläddra i källkod

bootstrap: update release 4.5

Simon Legner 5 år sedan
förälder
incheckning
852503ab41

+ 3 - 2
lib/docs/filters/bootstrap/clean_html_v4.rb

@@ -27,8 +27,9 @@ module Docs
             node['class'] = 'bd-example'
             node.remove_attribute('data-example-id')
             prev = node.previous_element
-            prev = prev.previous_element until prev['id']
-            node.inner_html = %(<a href="#{current_url}##{prev['id']}">Open example on getbootstrap.com</a>)
+            prev = prev.previous_element until !prev || prev['id']
+            anchor = prev ? %(##{prev['id']}) : ''
+            node.inner_html = %(<a href="#{current_url}#{anchor}">Open example on getbootstrap.com</a>)
           end
         end
 

+ 2 - 2
lib/docs/scrapers/bootstrap.rb

@@ -17,8 +17,8 @@ module Docs
     HTML
 
     version '4' do
-      self.release = '4.4.1'
-      self.base_url = 'https://getbootstrap.com/docs/4.4/'
+      self.release = '4.5'
+      self.base_url = 'https://getbootstrap.com/docs/4.5/'
       self.root_path = 'getting-started/introduction/'
 
       html_filters.push 'bootstrap/entries_v4', 'bootstrap/clean_html_v4'

+ 1 - 1
public/icons/docs/bootstrap/SOURCE

@@ -1 +1 @@
-https://raw.githubusercontent.com/twbs/bootstrap/master/docs/favicon.ico
+https://raw.githubusercontent.com/twbs/bootstrap/gh-pages/favicon.ico