Re: [viewvc-users] Questions with 1.1.5
"C. Michael Pilato" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <4C0524FD.4000008__27251.9189086326$1275405576$gmane$org@collab.net> |
Ron Buchholz wrote: > 1) Pygments is being used. When displaying html, python, css, .js, etc., > the colorization works great. When displaying C source files, there is no > coloring. What have I missed? Ray, we left this unanswered, it seems. ViewVC+Pygments is largely going to be using MIME type determinations to figure out what kind of syntax coloration to perform, falling back to a filename-based lexer decision only when the mimetype-based decision comes up short. Where does the MIME type come from? Well, CVS[NT] doesn't store a MIME type for files like Subversion can, so ViewVC will consult MIME type mapping files (those shipped with Python, and/or those configured for use with ViewVC via the mime_types_files configuration option) to map a filename (based on its extension) to a MIME type. Your system is probably not highlighting C files because it either isn't finding a MIME type mapping for the '.c' extension, or because it's finding a mapping that Pygments doesn't recognize. (According to the Pygments docs, their C lexer is going to get pulled up only for "text/x-chdr" and "text/x-csrc" MIME types.) You can add custom mappings for these MIME types to ViewVC's own mimetypes.conf file if you want to affect only ViewVC's behavior (versus changing your system's MIME mapping files). See the examples at the top of that file. -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Distributed Development On Demand ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2615600 To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkwFJP0ACgkQokEGqRcG/W47DQCfURRkF6cFWSNgKoo1HuJEhcks QLQAnAwbmd3hP4a6EzWj2v++qpyHL3D+ =Kh7k -----END PGP SIGNATURE-----