_plugins/macro_expander/macro_expander.rb
# Check if this macro is allowed in the page.
# @param code [String]  The macro code
# @return [Bool]
Check if this macro is allowed in the page.
Check if this macro is allowed in the page .
def allowed?(code)
      case @allowed
      when Array
        macro_name = code.match(/^[^\s({]+/)[0]
        @allowed.include?(macro_name)
      else
        true
      end
    end
def allowed? ( code ) case @allowed when Array macro_name = code . match ( / ^[^ \s ({]+ / ) [ 0 ] @allowed . include? ( macro_name ) else true end end
Check if this macro is allowed in the page.
Check if this macro is allowed in the page .
None
Bool
code
The macro code
The macro code