Project

General

Profile

Actions

Defect #13821

closed

"obj" parameter is not defined for macros used in description of documents

Added by Pierre-Louis Bonicoli over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Category:
Wiki
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Custom macros used in description of document don't receive a defined "obj" parameter:

  1. in document view, "object" parameter is not used when "textilizable" is called, so
  2. "obj" variable is not defined and any macro is called with a not defined "obj"
  3. macros can not access to the document that is rendered

For testing, here is a macro:

Redmine::WikiFormatting::Macros.register do
  desc "test macro" 
  macro :viewer do |obj, args|
    if obj
      'ok'
    else
      'nok'
    end
  end
end


Files

allow_macros_in_documents.diff (592 Bytes) allow_macros_in_documents.diff Pierre-Louis Bonicoli, 2013-04-20 05:25
Actions #2

Updated by Jean-Philippe Lang over 11 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.3.2
  • Resolution set to Fixed

Fixed in r11761, thanks for pointing this out.

Actions #3

Updated by Jean-Philippe Lang over 11 years ago

  • Status changed from Resolved to Closed

Merged.

Actions

Also available in: Atom PDF