From 38f4be018f357d09f9f5de081f9fa20db7c4cedb Mon Sep 17 00:00:00 2001 From: Stefan Breunig <307954+breunigs@users.noreply.github.com> Date: Sun, 5 Jan 2025 14:11:46 +0100 Subject: [PATCH] Update Elixir documentation (1.18) --- lib/docs/filters/elixir/clean_html.rb | 4 +++- lib/docs/scrapers/elixir.rb | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/elixir/clean_html.rb b/lib/docs/filters/elixir/clean_html.rb index 6783afb2..2d656ff6 100644 --- a/lib/docs/filters/elixir/clean_html.rb +++ b/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 << %(Source) diff --git a/lib/docs/scrapers/elixir.rb b/lib/docs/scrapers/elixir.rb index 47f361e6..14b3c164 100644 --- a/lib/docs/scrapers/elixir.rb +++ b/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 = [