From 7ff958a491a38bfec987fae9f9bb2690c2bd5877 Mon Sep 17 00:00:00 2001 From: Virtual256 Date: Fri, 26 Jul 2024 16:35:02 -0700 Subject: [PATCH] fix rust 1.79.0 docs std crate indexing --- lib/docs/filters/rust/clean_html.rb | 1 + lib/docs/filters/rust/entries.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/docs/filters/rust/clean_html.rb b/lib/docs/filters/rust/clean_html.rb index f42b714a..1b725a24 100644 --- a/lib/docs/filters/rust/clean_html.rb +++ b/lib/docs/filters/rust/clean_html.rb @@ -19,6 +19,7 @@ module Docs css('.anchor').remove css('.main-heading > h1').each do |node| + node.at('button')&.remove node.parent.name = 'h1' node.parent.content = node.content end diff --git a/lib/docs/filters/rust/entries.rb b/lib/docs/filters/rust/entries.rb index cadb6786..db795cb7 100644 --- a/lib/docs/filters/rust/entries.rb +++ b/lib/docs/filters/rust/entries.rb @@ -9,6 +9,7 @@ module Docs elsif slug == 'error-index' 'Compiler Errors' else + at_css('main h1').at_css('button')&.remove name = at_css('main h1').content.remove(/\A.+\s/).remove('⎘') mod = slug.split('/').first name.prepend("#{mod}::") unless name.start_with?(mod)