Hi Noah, I had a feeling I'd hear from you on this one.

I tried several of these techniques, and none of them worked.
If I wrap the return string in a useless <span> for example, it
behaves the same way.

The problem is the wiki engine is kicking in *before* the macro
is expanded.

In a {{{[[Macro()]]}}} or `[[Macro()]]` context that's fine, it's what
you'd expect. But in a heading context:

= [[MyMacro()]] =

The macro is never called. In fact, to prove this, insert the
above text into a sandbox and you'll see what I mean. There
is no MyMacro, but the engine doesn't care or warn you, it
simply restructures the text and returns:

<h1 id="MyMacro">[[MyMacro]]</h1>

Thanks for your feedback. --doug

On Dec 18, 2:38 am, Noah Kantrowitz <[email protected]> wrote:
> To return HTML markup you can either return the string wrapped as a
> Markup object (genshi.core.Markup) or use the builder API
> (genshi.builder.tag). Using the build API is preferable since it is
> generally more compact, and helps to ensure valid markup.
>
> --Noah
>
> [snip]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to