On 5/19/2010 5:36 PM, Itamar O wrote:
I am trying to write a macro that needs to know the context in which
it was instantiated.
By "context" I mean the hierarchy of containing wiki elements (div,
table, ..), and their attributes.
How do I access this information from within the macro?


That's probably not doable in the current architecture, short of re-parsing the whole wiki text yourself with a custom Formatter and trying to find the correspondance. Well, don't even try, rather help me on the new wiki (http://trac.edgewall.org/ticket/4431) ;-) The idea would be to call a parse_macro method on the macros during the parse phase, passing the wiki DOM tree. It would be easy for you to look at the ancestor nodes and determine the RTL context from that.

-- Christian

--
You received this message because you are subscribed to the Google Groups "Trac 
Development" 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-dev?hl=en.

Reply via email to