support for 2.3/2.4, and formatting inside the notes

This commit is contained in:
Daniel Seifert 2013-11-28 16:56:20 +01:00
parent 7efd51d3e8
commit 2d01e88d98
2 changed files with 10 additions and 10 deletions

View file

@ -32,8 +32,8 @@ Redmine::Plugin.register :redmine_wiki_notes do
author 'Daniel Seifert'
description 'Allows adding different kinds of notes into a wiki page'
url "http://www.github.com/dseifert/redmine_wiki_notes" if respond_to?(:url)
version '0.0.1'
requires_redmine :version_or_higher => '0.9.0'
version '0.0.2'
requires_redmine :version_or_higher => '2.3.0'
RedCloth3::ALLOWED_TAGS << "div"
end

View file

@ -6,30 +6,30 @@ module WikiNotesMacro
" @!{{important(text)}}@\n"
" @!{{warning(text)}}@\n"
macro :note do |obj, args|
macro :note, :parse_args => false do |obj, args|
o = '<div class="noteclassic">'
o << args.join(",")
o << textilizable(args)
o << '</div>'
o.html_safe
end
macro :tip do |obj, args|
macro :tip, :parse_args => false do |obj, args|
o = '<div class="notetip">'
o << args.join(",")
o << textilizable(args)
o << '</div>'
o.html_safe
end
macro :important do |obj, args|
macro :important, :parse_args => false do |obj, args|
o = '<div class="noteimportant">'
o << args.join(",")
o << textilizable(args)
o << '</div>'
o.html_safe
end
macro :warning do |obj, args|
macro :warning, :parse_args => false do |obj, args|
o = '<div class="notewarning">'
o << args.join(",")
o << textilizable(args)
o << '</div>'
o.html_safe
end