Opened 18 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)
Change History (8)
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
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
Component: | TracHacks → TracPygmentsPlugin |
---|---|
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 17 years ago by
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 17 years ago by
Attachment: | fix_trac_rst_and_diff.patch added |
---|
I use this hack to fix the issue in my environments
comment:5 Changed 17 years ago by
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 17 years ago by
Attachment: | fix_trac_rst_and_diff_2.patch added |
---|
comment:6 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Closing ticket since plugin is unmaintained and support can be found by upgrading to Trac 0.11.
+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