From b51be1f9b0f650d6d5ad118998354dd339db6023 Mon Sep 17 00:00:00 2001 From: spamguy Date: Wed, 1 Apr 2026 12:55:28 -0700 Subject: [PATCH 1/2] #2671: Do not scroll to top for anchored entries, because they are never cached. --- assets/javascripts/views/content/content.js | 8 ++++++-- lib/docs/filters/nim/clean_html.rb | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/views/content/content.js b/assets/javascripts/views/content/content.js index 3e5ddaf20b..e654d33ee3 100644 --- a/assets/javascripts/views/content/content.js +++ b/assets/javascripts/views/content/content.js @@ -150,8 +150,12 @@ app.views.Content = class Content extends app.View { beforeRoute(context) { this.cacheScrollPosition(); - // If scroll position wasn't cached from an earlier visit, scroll to top. - if (!this.scrollMap[context.state.id]) { + /* + * If scroll position wasn't cached from an earlier visit: + * - let the anchor (if there is one) set position, or + * - scroll to top. + */ + if (!this.scrollMap[context.state.id] && !context.hash) { this.scrollToTop(); } diff --git a/lib/docs/filters/nim/clean_html.rb b/lib/docs/filters/nim/clean_html.rb index 89b638fe6d..66dfe270d7 100644 --- a/lib/docs/filters/nim/clean_html.rb +++ b/lib/docs/filters/nim/clean_html.rb @@ -58,6 +58,11 @@ def call css('a', 'dl', 'table', 'code').remove_attr('class') css('table').remove_attr('border') + # Remove Source/Edit links. + css('dd > a').each do |node| + node.remove if node.inner_html == 'Source' || node.inner_html == 'Edit' + end + doc end end From 2240f464e33637e01c234614ff83a238ed28e747 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 12 Apr 2026 20:40:19 +0200 Subject: [PATCH 2/2] Update Python documentation (3.14.4) --- lib/docs/scrapers/python.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index efb4df928a..7c80e7549a 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -23,12 +23,12 @@ class Python < UrlScraper library/sunau.html) options[:attribution] = <<-HTML - © 2001–2025 Python Software Foundation
+ © 2001 Python Software Foundation
Licensed under the PSF License. HTML version '3.14' do - self.release = '3.14.3' + self.release = '3.14.4' self.base_url = "https://docs.python.org/#{self.version}/" html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'