From 67e70905d54917a3dee1923d877e47b10f1df0d7 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 15 Feb 2026 03:32:09 +0000 Subject: [PATCH] Fixes copy button appears only on the last pre when multiple pre blocks exist (#43801, #42737). git-svn-id: https://svn.redmine.org/redmine/trunk@24413 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting/copypre_scrubber.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/wiki_formatting/copypre_scrubber.rb b/lib/redmine/wiki_formatting/copypre_scrubber.rb index 2afd02823..60810237e 100644 --- a/lib/redmine/wiki_formatting/copypre_scrubber.rb +++ b/lib/redmine/wiki_formatting/copypre_scrubber.rb @@ -26,7 +26,7 @@ module Redmine icon = ApplicationController.helpers.sprite_icon('copy-pre-content', size: 18) button_copy = ApplicationController.helpers.l(:button_copy) html = '' + icon + '' - @button ||= Nokogiri::HTML5.fragment(html).children.first + Nokogiri::HTML5.fragment(html).children.first end end end