Modify

Opened 17 years ago

Closed 14 years ago

#1408 closed defect (wontfix)

Trac-hacks.org does not render ReStructuredText

Reported by: Emmanuel Blot Owned by: Matt Good
Priority: high Component: TracPygmentsPlugin
Severity: major Keywords:
Cc: th07@… Trac Release: 0.10

Description

See WikiRestructuredText for example. This breaks display of pages hosted on Trac Hacks.

It seems that Pygments takes precedence over Docutils for some reason.

However, quality ratio is defined to 7 for Pygments in TracPygmentsPlugin, whereas Trac's rst.py defines a quality ratio of 8.

I've not been able to reproduce this error on a local installation with the latest 0.10 Trac version, docutils 0.4 (the same as on http://trac-hacks.org) and Pygments 0.7.1

Attachments (2)

fix_trac_rst_and_diff.patch (631 bytes) - added by Markus Pelkonen 16 years ago.
I use this hack to fix the issue in my environments
fix_trac_rst_and_diff_2.patch (665 bytes) - added by anonymous 16 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 17 years ago by anonymous

+1 here. Trac-0.10.4 Pygments-0.7.1

Adding [components] tracpygments.* = enabled to trac.ini break restructured text rendering on my local installation

comment:2 Changed 17 years ago by haizaar@…

Sorry for commenting twice - forgot to set email

+1 here. Trac-0.10.4 Pygments-0.7.1

Adding [components] tracpygments.* = enabled to trac.ini break restructured text rendering on my local installation

comment:3 Changed 17 years ago by Alec Thomas

Component: TracHacksTracPygmentsPlugin
Owner: changed from Alec Thomas to Matt Good

This is fixed on TracHacks with a hack, but I'm not sure what the long term fix is.

The problem is that Trac doesn't use the MIME system for rendering highlighted blocks, it's simply a macro call. TracPygmentsPlugin registers a macro for each "short name" Pygments knows about, rst included. This takes precedence over the builtin rst macro and we end up with ReStructuredText not rendering correctly.

I'm going to reassign this to TracPygmentsPlugin, as it's not a problem with TracHacks. Not sure what the correct fix is, whether it be in Trac or the plugin.

comment:4 Changed 16 years ago by anonymous

Cc: th07@… added; anonymous removed

This same happens when I would like to have Trac to render diff? Table format is much more better for my stakeholders than pygments color coding... Please propose patches, which would help here...

Changed 16 years ago by Markus Pelkonen

Attachment: fix_trac_rst_and_diff.patch added

I use this hack to fix the issue in my environments

comment:5 Changed 16 years ago by anonymous

fix_trac_rst_and_diff.patch takes out syntax highlighting completely. [fix_trac_rst_and_diff_2.patch] patch fixes the problem and at the same time leaves syntax highlighting for restructured (use rest, restructured macros).

Changed 16 years ago by anonymous

comment:6 Changed 14 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Closing ticket since plugin is unmaintained and support can be found by upgrading to Trac 0.11.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matt Good.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.