Ok, as a workaround I'm fighting fire with fire:
[MacroMethod(typeof(string), "Prints a macro as text", 1)]
[MacroMethodParam(0, "Macro text", typeof(string), "the macro without {% %}")]
public static object PrintMacro(EvaluationContext context, params object[] parameters)
{
switch (parameters.Length)
{
case 1:
return "{% " + parameters[0].ToString() + " %}";
default:
return "";
}
}
This works at least, but if anyone knows a better solution, please share...