From d572ff638d74bb8de6d53e5ecb8d59290de4066e Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Thu, 8 Apr 2021 18:18:30 +0200 Subject: [PATCH] Update macro to support redmine 4.1.* --- init.rb | 3 ++- lib/wiki_notes_macros.rb | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/init.rb b/init.rb index 8296a30..6c838a7 100644 --- a/init.rb +++ b/init.rb @@ -39,12 +39,13 @@ else end require 'RedCloth' + Redmine::Plugin.register :redmine_wiki_notes do name 'Redmine Wiki Notes plugin' author 'Daniel Seifert, Victor Laborie' description 'Allows adding different kinds of notes into a wiki page' url "http://www.github.com/vlaborie/redmine_wiki_notes" if respond_to?(:url) - version '0.0.4' + version '0.0.5' requires_redmine :version_or_higher => '4.0.0' RedCloth3::ALLOWED_TAGS << "div" diff --git a/lib/wiki_notes_macros.rb b/lib/wiki_notes_macros.rb index 43865f4..a4c150c 100644 --- a/lib/wiki_notes_macros.rb +++ b/lib/wiki_notes_macros.rb @@ -9,7 +9,7 @@ module WikiNotesMacro macro :note, :parse_args => false do |obj, args, text| o = textilizable(args) if text.present? - o << textilizable(text, :object => obj, :headings => false) + o += textilizable(text, :object => obj, :headings => false) end content_tag('div', o.html_safe, :class => "noteclassic") end @@ -18,7 +18,7 @@ module WikiNotesMacro macro :tip, :parse_args => false do |obj, args, text| o = textilizable(args) if text.present? - o << textilizable(text, :object => obj, :headings => false) + o += textilizable(text, :object => obj, :headings => false) end content_tag('div', o.html_safe, :class => "notetip") end @@ -27,7 +27,7 @@ module WikiNotesMacro macro :important, :parse_args => false do |obj, args, text| o = textilizable(args) if text.present? - o << textilizable(text, :object => obj, :headings => false) + o += textilizable(text, :object => obj, :headings => false) end content_tag('div', o.html_safe, :class => "noteimportant") end @@ -36,7 +36,7 @@ module WikiNotesMacro macro :warning, :parse_args => false do |obj, args, text| o = textilizable(args) if text.present? - o << textilizable(text, :object => obj, :headings => false) + o += textilizable(text, :object => obj, :headings => false) end content_tag('div', o.html_safe, :class => "notewarning") end