]> source.dussan.org Git - redmine.git/commitdiff
add empty line after guard clause to lib/redmine/wiki_formatting/macros.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 3 Nov 2020 14:54:59 +0000 (14:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 3 Nov 2020 14:54:59 +0000 (14:54 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20230 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/wiki_formatting/macros.rb

index 429123b4b2ded0bea4163c79d737d9307be7c09c..fc907db91f1e422f4a2aeed7e08b7081758292a1 100644 (file)
@@ -157,6 +157,7 @@ module Redmine
           unless block_given?
             raise "Can not create a macro without a block!"
           end
+
           name = name.to_s.downcase.to_sym
           available_macros[name] = {:desc => @@desc || ''}.merge(options)
           @@desc = nil
@@ -207,6 +208,7 @@ module Redmine
           raise t(:error_childpages_macro_no_argument)
         end
         raise t(:error_page_not_found) if page.nil? || !User.current.allowed_to?(:view_wiki_pages, page.wiki.project)
+
         pages = page.self_and_descendants(options[:depth]).group_by(&:parent_id)
         render_page_hierarchy(pages, options[:parent] ? page.parent_id : page.id)
       end
@@ -217,8 +219,10 @@ module Redmine
       macro :include do |obj, args|
         page = Wiki.find_page(args.first.to_s, :project => @project)
         raise t(:error_page_not_found) if page.nil? || !User.current.allowed_to?(:view_wiki_pages, page.wiki.project)
+
         @included_wiki_pages ||= []
         raise t(:error_circular_inclusion) if @included_wiki_pages.include?(page.id)
+
         @included_wiki_pages << page.id
         out = textilizable(page.content, :text, :attachments => page.attachments, :headings => false,  :inline_attachments => @@inline_attachments)
         @included_wiki_pages.pop
@@ -248,8 +252,10 @@ module Redmine
         args, options = extract_macro_options(args, :size, :title)
         filename = args.first
         raise t(:error_filename_required) unless filename.present?
+
         size = options[:size]
         raise t(:error_invalid_size_parameter) unless size.nil? || /^\d+$/.match?(size)
+
         size = size.to_i
         size = 200 unless size > 0
         if obj && obj.respond_to?(:attachments) && attachment = Attachment.latest_attach(obj.attachments, filename)