[devdocsgjs/main: 1815/1867] Update webpack documentation (5.59.1)




commit da98edbdb7d46aa2115468e5cd330df59de2e895
Author: Simon Legner <Simon Legner gmail com>
Date:   Fri Oct 22 17:47:22 2021 +0200

    Update webpack documentation (5.59.1)

 lib/docs/filters/webpack/entries.rb | 10 +++++-----
 lib/docs/scrapers/webpack.rb        |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/lib/docs/filters/webpack/entries.rb b/lib/docs/filters/webpack/entries.rb
index cd943a72..27317873 100644
--- a/lib/docs/filters/webpack/entries.rb
+++ b/lib/docs/filters/webpack/entries.rb
@@ -22,16 +22,16 @@ module Docs
 
       def additional_entries
         if slug.start_with?('configuration')
-          css('h2[id] code').each_with_object [] do |node, entries|
-            next if node.previous.try(:content).present?
-            entries << [node.content, node.parent['id']]
+          css('h2[id]').each_with_object [] do |node, entries|
+            next if version.to_f < 5 && node.previous.try(:content).present?
+            entries << [node.content, node['id']]
           end
         elsif slug.start_with?('api') && slug != 'api/parser'
           css('.header[id] code').each_with_object [] do |node, entries|
-            next if node.previous.try(:content).present? || node.next.try(:content).present?
+            next if version.to_f < 5 && (node.previous.try(:content).present? || 
node.next.try(:content).present?)
             name = node.content.sub(/\(.*\)/, '()')
             name.prepend "#{self.name.split(':').first}: "
-            entries << [name, node.parent['id']]
+            entries << [name, node['id']]
           end
         else
           []
diff --git a/lib/docs/scrapers/webpack.rb b/lib/docs/scrapers/webpack.rb
index 947a5743..be6771c3 100644
--- a/lib/docs/scrapers/webpack.rb
+++ b/lib/docs/scrapers/webpack.rb
@@ -36,7 +36,7 @@ module Docs
     HTML
 
     version '5' do
-      self.release = '5.41.1'
+      self.release = '5.59.1'
       self.base_url = 'https://webpack.js.org/'
     end
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]