From 1c17ae733dfa0216fb6427722d2a479413369e87 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 10 Apr 2024 02:48:29 +0000 Subject: [PATCH] Fix initial_page_content method to avoid referencing @page instance variable in wiki formatting helpers (#40513). Patch by Takuya Kodama (@otegami). git-svn-id: https://svn.redmine.org/redmine/trunk@22781 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting/common_mark/helper.rb | 2 +- lib/redmine/wiki_formatting/markdown/helper.rb | 2 +- lib/redmine/wiki_formatting/textile/helper.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/redmine/wiki_formatting/common_mark/helper.rb b/lib/redmine/wiki_formatting/common_mark/helper.rb index 417ffab22..f75f1fc0e 100644 --- a/lib/redmine/wiki_formatting/common_mark/helper.rb +++ b/lib/redmine/wiki_formatting/common_mark/helper.rb @@ -33,7 +33,7 @@ module Redmine end def initial_page_content(page) - "# #{@page.pretty_title}" + "# #{page.pretty_title}" end def heads_for_wiki_formatter diff --git a/lib/redmine/wiki_formatting/markdown/helper.rb b/lib/redmine/wiki_formatting/markdown/helper.rb index a5a836184..e77547412 100644 --- a/lib/redmine/wiki_formatting/markdown/helper.rb +++ b/lib/redmine/wiki_formatting/markdown/helper.rb @@ -33,7 +33,7 @@ module Redmine end def initial_page_content(page) - "# #{@page.pretty_title}" + "# #{page.pretty_title}" end def heads_for_wiki_formatter diff --git a/lib/redmine/wiki_formatting/textile/helper.rb b/lib/redmine/wiki_formatting/textile/helper.rb index 4fa3bacb6..ad6e53992 100644 --- a/lib/redmine/wiki_formatting/textile/helper.rb +++ b/lib/redmine/wiki_formatting/textile/helper.rb @@ -32,7 +32,7 @@ module Redmine end def initial_page_content(page) - "h1. #{@page.pretty_title}" + "h1. #{page.pretty_title}" end def heads_for_wiki_formatter -- 2.39.5