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 | <4B8D18B4.2080301__38275.4310536713$1267538118$gmane$org@collab.net> |
No inconvenience here at all -- helping folks use ViewVC is precisely what this list is for. Glad you got it all sorted out. chella moneycome wrote: > Many thanks again Michael, I am able to see the syntax after I enabled > mime_types_files and assign '/etc/httpd/conf/mime.types' to it in > viewvc.conf. I was asking about hightlighting for c file. I was able to > view the c files and any files with an extension but NOT files without > extension, hence included README view error. This too is resolved by the > above change. Apologies for any inconvenience, thanks again. > > On Mon, Mar 1, 2010 at 2:31 PM, C. Michael Pilato <[email protected] > <mailto:[email protected]>> wrote: > > 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/> <http://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] <mailto:[email protected]>> > CollabNet <> www.collab.net <http://www.collab.net/> <> > Distributed Development On Demand > > -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Distributed Development On Demand ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2453993 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) iEYEARECAAYFAkuNGLQACgkQokEGqRcG/W5whgCfZzkWoh+MPmVpTl7prMBaY9y6 sRIAoJgxM1TQsjAYIQ3TasMCKcFagItr =Vqww -----END PGP SIGNATURE-----