Browse Source

Update url's and fix filters for 5.13

Jasper van Merle 6 years ago
parent
commit
9b1483505b
3 changed files with 9 additions and 2 deletions
  1. 1 0
      lib/docs/filters/qt/clean_html.rb
  2. 1 0
      lib/docs/filters/qt/entries.rb
  3. 7 2
      lib/docs/scrapers/qt.rb

+ 1 - 0
lib/docs/filters/qt/clean_html.rb

@@ -8,6 +8,7 @@ module Docs
         # QML property/method header
         css('.qmlproto').each do |node|
           id = node.at_css('tr')['id']
+          id = node.at_css('a')['name'] if id.blank?
           node.inner_html = node.at_css('td').inner_html
           node.name = 'h3'
           node['id'] = id

+ 1 - 0
lib/docs/filters/qt/entries.rb

@@ -111,6 +111,7 @@ module Docs
         css('.qmlproto').each do |node|
           title = node.content.strip
           id = node.at_css('tr')['id']
+          id = node.at_css('a')['name'] if id.blank?
 
           # Remove options
           title.remove!(%r{^\[.*\] })

+ 7 - 2
lib/docs/scrapers/qt.rb

@@ -103,6 +103,11 @@ module Docs
       Licensed under the GNU Free Documentation License, Version 1.3.
     HTML
 
+    version '5.13' do
+      self.release = '5.13'
+      self.base_url = 'https://doc.qt.io/qt-5.13/'
+    end
+
     version '5.12' do
       self.release = '5.12'
       self.base_url = 'https://doc.qt.io/qt-5.12/'
@@ -110,7 +115,7 @@ module Docs
 
     version '5.11' do
       self.release = '5.11'
-      self.base_url = 'https://doc.qt.io/qt-5.11/'
+      self.base_url = 'https://doc.qt.io/archives/qt-5.11/'
     end
 
     version '5.9' do
@@ -120,7 +125,7 @@ module Docs
 
     version '5.6' do
       self.release = '5.6'
-      self.base_url = 'https://doc.qt.io/qt-5.6/'
+      self.base_url = 'https://doc.qt.io/archives/qt-5.6/'
     end
 
     def get_latest_version(opts)