Bläddra i källkod

Merge pull request #2400 from breunigs/ex18

Update Elixir documentation (1.18)
Simon Legner 11 månader sedan
förälder
incheckning
aa16f8357d
2 ändrade filer med 15 tillägg och 1 borttagningar
  1. 3 1
      lib/docs/filters/elixir/clean_html.rb
  2. 12 0
      lib/docs/scrapers/elixir.rb

+ 3 - 1
lib/docs/filters/elixir/clean_html.rb

@@ -34,7 +34,9 @@ module Docs
             node.name = 'h3'
             node['id'] = id
 
-            source_href = node.at_css('a.icon-action[title="View Source"]').attr('href')
+            a = node.at_css('a.icon-action[title="View Source"]')
+            a ||= node.at_css('a.icon-action[aria-label="View Source"]')
+            source_href = a.attr('href')
 
             node.content = node.at_css('.signature').inner_text
             node << %(<a href="#{source_href}" class="source">Source</a>)

+ 12 - 0
lib/docs/scrapers/elixir.rb

@@ -30,6 +30,18 @@ module Docs
         "https://hexdocs.pm/mix/#{self.class.release}/Mix.html" ]
     end
 
+    version '1.18' do
+      self.release = '1.18.1'
+      self.base_urls = [
+        "https://hexdocs.pm/elixir/#{release}/",
+        "https://hexdocs.pm/eex/#{release}/",
+        "https://hexdocs.pm/ex_unit/#{release}/",
+        "https://hexdocs.pm/iex/#{release}/",
+        "https://hexdocs.pm/logger/#{release}/",
+        "https://hexdocs.pm/mix/#{release}/"
+      ]
+    end
+
     version '1.17' do
       self.release = '1.17.2'
       self.base_urls = [