Opened 11 years ago
Last modified 11 years ago
#11296 closed enhancement
"application/x-dos-batch" is an unknown mimetype when Pygments is not installed — at Initial Version
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | low | Milestone: | 1.0.2 |
Component: | rendering | Version: | 1.0-stable |
Severity: | normal | Keywords: | mimetype wikiprocessor syntaxcoloring |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The WikiProcessor #!application/x-dos-batch
is used on the TracRepositoryAdmin page. In an installation without Pygments, the following error will be seen:
I propose the following patch to fix the issue, followed by replacement of #!application/x-dos-batch
with #!dos
on the TracRepositoryAdmin page.
-
trac/mimeview/api.py
diff --git a/trac/mimeview/api.py b/trac/mimeview/api.py index 2e3ca1d..aaaa550 100644
a b KNOWN_MIME_TYPES = { 290 290 'application/pdf': 'pdf', 291 291 'application/postscript': 'ps', 292 292 'application/rtf': 'rtf', 293 'application/x-dos-batch': 'dos batch cmd', 293 294 'application/x-sh': 'sh', 294 295 'application/x-csh': 'csh', 295 296 'application/x-troff': 'nroff roff troff',
Note:
See TracTickets
for help on using tickets.