#4523 closed enhancement (worksforme)
How to add JSP syntax coloring to Trac
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | lowest | Milestone: | |
Component: | version control/browser | Version: | 0.10.2 |
Severity: | trivial | Keywords: | jsp, syntax, highlighting, coloring |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
In trac_install_dir\mimeview\api.py if you change line 94 to read
'text/xml': ['xml', 'jsp'],
then you will have pretty good syntax highlighting (at least good enough to get you through until SilverCity or Enscript add JSP)
Attachments (0)
Change History (4)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Milestone: | 0.10.4 |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Well, no, in 0.10 we added a way to avoid having to hack the mimeview/api.py file each time a new kind of highlighting was needed: check TracIni#mimeviewer-section, the mime_map
entry.
Here that would be:
[mimeviewer] mime_map = text/xml:jsp
as xml is already mapped.
On a related node, Pygments could probably be extended to support highlighting HTML and the Java expressions inside…
comment:3 by , 18 years ago
I've opened an enhancement for this in Pygments: http://trac.pocoo.org/ticket/184
Using Trac 0.11dev or the th:TracPygmentsPlugin Trac should automatically support this if/when it's added to Pygments.
comment:4 by , 18 years ago
Done by Tim in http://trac.pocoo.org/changeset/2693.
Looks like it will be available in Pygments 0.7.
Forgot to mention, the java portions of the JSP will stay in plain text but any HTML parts and any use of taglibs will be colored properly