On Nov 14, 2006, at 7:32 AM, Christian Boos wrote:

>
> Tim Hatch wrote:
>> I notice that a lot of the new users to Trac end up pasting  
>> tracebacks.
>>  I know this is being fixed in devel by the "Add Ticket" button, but
>> should those be automatically converted to code blocks if left bare?
>> I've got an 11-line patch that isn't too obtrusive for tracebacks  
>> (done
>> in trac.wiki.formatter.Formatter.format().
>
> You mean special highlighting for Python tracebacks? That could be
> useful, and should be done as a macro or WikiProcessor, so you  
> could add
> that in a code block. Recognizing bare tracebacks would be harder, and
> probably not easily doable with the current  IWikiSyntaxProvider API.
> Patching the main "engine" is not a good idea for such a specialized
> situation.

I couldn't sleep this morning, so I thought I would try doing this.  
The output needs some styling and whatnot, but the basic idea works.  
If someone with better CSS-foo than me would like to have a go at it,  
be my guest.

http://www.coderanger.net/~coderanger/trac/plugins/formattb/formattb/ 
formatter.py

--Noah

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