> - how are the regexps returned by get_wiki_syntax() supposed to be  
> used
>  by the caller ?

The best place to learn this is check trac/wiki/api.py and search for  
where IWikiSyntaxProvider is actually used.  IIRC the regexps are  
thrown in a huge alternation and matched against the wiki page text.   
You yield a (regex, callback) tuple, which the system takes care of  
calling your callback when the regex matches.  The callback is  
responsible for returning a chunk of html using the tag builder, or  
plain text.  If you need more detail, please mention the specific part  
that's confusing.

> - Can anyone shed some light on why the regexps in the current
>  implementation (WikiSystem) make a so heavy use of (?:...)

That behaves like ( ) except it doesn't save a capture group.  A lot  
of the time it's used as (?:...)? in Trac which allows you to make  
multiple things optional.  I'll give you the names of the constructs,  
look them up on http://www.regular-expressions.info/lookaround.html  
for a good idea of what they can do.

> (?=...) and

That's positive lookahead.  Could you point out the specific line  
that's confusing?  I'm guessing you're speaking of the "what should  
follow it" line, where its purpose is to disallow matching when it's  
really not the end of a camelcased word.

> (?<=...) constructs ?

Positive lookbehind.

> - What is the purpose of the _check_unicode_camelcase() further  
> check ?

It appears that wiki_page_name is constructed to match lower ascii  
camelcase words (but be agnostic toward unicode ones, which need to be  
checked with the function).

Tim

--~--~---------~--~----~------------~-------~--~----~
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