Modify

Opened 8 years ago

Closed 4 years ago

#1408 closed defect (wontfix)

Trac-hacks.org does not render ReStructuredText

Reported by: eblot Owned by: mgood
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 mape 7 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 6 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 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 7 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 7 years ago by athomas

  • Component changed from TracHacks to TracPygmentsPlugin
  • Owner changed from athomas to mgood

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 7 years ago by anonymous

  • Cc th07@… added

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 7 years ago by mape

I use this hack to fix the issue in my environments

comment:5 Changed 6 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 6 years ago by anonymous

comment:6 Changed 4 years ago by rjollos

  • Resolution set to wontfix
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.