Re: [viewvc-users] help needed for syntax highlighting
"C. Michael Pilato" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <[email protected]> |
chella moneycome wrote:
> Hi there,
>
> Coudl you please take a look and advise
>
> Looks like syntax highlighting is working for some files, please refer
> attached Contents of Makefile (2.jpg) , test.xml (4.jpg) and zTest.sh
> (5.jpg), and not for some files.
>
> */test.c/*
>
> Could see the below line in /etc/httpd/conf/mime.types
>
> text/x-c c cc cxx cpp h hh dic
This looks fine, assuming that you've told ViewVC to look up MIME types in
/etc/httpd/conf/mime.types via the 'mime_types_files' configuration option.
> and below lines in /usr/share/enscript/hl/enscript.st <http://enscript.st>
>
> namerules
> {
> /\.(c|h)$/ c;
> ~
> ~
> }
>
> startrules
> {
> /.\010.\010.\010./ nroff;
> /-\*- [Cc] -\*-/ c;
> ~
> ~
> }
This is irrelevant, because ViewVC no longer uses enscript for syntax
highlighting. It uses Pygments.
> but the MIME type is text/plain in viewVC for .c files. Please refer
> attached Contents of test.c (3.jpg)
Is the MIME type text/plain because perhaps that's what the svn:mime-type
property set on that file declares it to be? By default, ViewVC will honor
the svn:mime-type property value before resorting to a lookup in the system
MIME mapping file.
> File "/usr/local/lib/python2.6/dist-packages/Pygments-1.2.2-py2.6.egg/pygments/lexers/__init__.py", line 124, in get_lexer_for_filename
> raise ClassNotFound('no lexer for filename %r found' % _fn)
> ClassNotFound: no lexer for filename 'README' found
Why are you asking about C files but showing an error for a README file?
--
C. Michael Pilato <[email protected]>
CollabNet <> www.collab.net <> Distributed Development On Demand
------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2453602
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) iEYEARECAAYFAkuMJBoACgkQokEGqRcG/W7E8QCgn1A3ZcVmrnZQ7n09LjkQ4oyR Z4cAmQFjkKe/j6ZgUfpWVRGaPwJcCm/L =5Z2O -----END PGP SIGNATURE-----