Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12141 closed defect (fixed)

INSTALL.rst not rendered as RestructuredText

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.2
Component: rendering Version:
Severity: normal Keywords: pygments
Cc: Branch:
Release Notes:

Renamed INSTALL to INSTALL.rst and UPGRADE to UPGRADE.rst. Modified the default value of [mimeviewer] mime_map_patterns so that INSTALL.rst isn't matched by the regular expression for the text/plain mime type. INSTALL.rst and UPGRADE.rst should now be rendered to HTML when docutils is installed, even when viewing the files in a Git repository (or any other VCS that doesn't allow the mimetype to be set as a repository property, like Subversion does).

API Changes:
Internal Changes:

Description

One of the tasks in #12120 is to add the rst extension to INSTALL and UPGRADE. However, INSTALL.rst is rendered in plain text due to the default value of [mimeview] mime_map_patterns.

[mimeviewer]

mime_map_patterns

List of additional MIME types associated to filename patterns. Mappings are comma-separated, and each mapping consists of a MIME type and a Python regexp used for matching filenames, separated by a colon (":"). (since 1.0)

text/plain:README(?!\.rst)|INSTALL(?!\.rst)|COPYING.*

Another issue is that both UPGRADE.rst and INSTALL.rst (after correcting above issue) are rendered with mimetype text/prs.fallenstein.rst. The issue may only occur when Pygments is installed. More investigation is needed.

Attachments (0)

Change History (6)

comment:1 by Ryan J Ollos, 9 years ago

Milestone: next-dev-1.1.x1.2
Owner: set to Ryan J Ollos
Status: newassigned

in reply to:  description comment:2 by Ryan J Ollos, 9 years ago

Replying to Ryan J Ollos:

Another issue is that both UPGRADE.rst and INSTALL.rst (after correcting above issue) are rendered with mimetype text/prs.fallenstein.rst. The issue may only occur when Pygments is installed. More investigation is needed.

With Pygments installed we just get Syntax Highlighting. Rendering to HTML requires Docutils installed.

When Pygments is installed the mime_map is populated by get_extra_mimetype from Pygments. Pygments returns the mapping 'rst': 'text/x-rst' followed by 'rst': 'text/prs.fallenstein.rst', with the latter overwriting the former in the dictionary. This doesn't seem to be a problem since prs.fallenstein.rst appears to be an alias of text/x-rst.

comment:3 by Ryan J Ollos, 9 years ago

Release Notes: modified (diff)

Proposed changes in log:rjollos.git:t12141_install_rst_rendering. I considered an upgrade step to modify the trac.ini for existing users, but I tend to think it's not worth the complication or effort.

DONE Modify TracDev/ReleaseChecklist#Wikirelatedfiles to change output filenames.

DONE Modify [mimeviewer] mime_map_patterns in the trac.ini for t.e.o.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:4 by Ryan J Ollos, 9 years ago

Resolution: fixed
Status: assignedclosed

Committed to trunk in [14330].

comment:5 by Ryan J Ollos, 9 years ago

This hint led me to consider if we should add the rst extension to README and RELEASE, since both are written in ReST. Proposed changes in log:rjollos.git:t12141_more_rst_rendering.

comment:6 by Ryan J Ollos, 9 years ago

comment:5 changes committed to trunk in [14536,14540:14541].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.