On Aug 27, 12:31 pm, "Noah Kantrowitz" <[EMAIL PROTECTED]> wrote:
> The mimeview system works based entirely on MIME types, so if an explicit
> one is set via properties it will override all auto-detection. This is a
> feature, not a bug.
>
> --Noah
>
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> > On Behalf Of VegHead
> > Sent: Wednesday, August 27, 2008 9:58 AM
> > To: Trac Users
> > Subject: [Trac] Re: Source Browser - Syntax Highlighting not working
>
> > Okay, I now understand the problem, but I'm still confused why it's an
> > issue. Files with the mime-type explicitly set to text/plain via the
> > svn property (e.g. svn:mime-type=text/plain) are not displayed using
> > syntax highlighting in Trac. Files w/out an explicit mime-type display
> > correctly.
>
> > I would expect to Trac to honor the mime-type in certain cases (like
> > any binary type), but I wouldn't expect text/plain to interfere with
> > syntax highlighting. Is this the expected/desired behavior?
>
> > -VegHead
>
text/plain isn't interfering with syntax higlighting, it's displaying
the file as text/plain, which happens to not have syntax, or a
highligting engine.

Simply put, if the file is a known mime-type, either don't set it's
subversion property, or set it correctly.

however, if you really want to set the mime-types for other things
that grab files from the repo, do soemhting like this in your clients'
config file:
which will set the mime-type to match what is in the trac mimeviewer
api (there are a few discrepencies there, tweaked a bit to my usage)
[auto-props]
### The format of the entries is:
###   file-name-pattern = propname[=value][;propname[=value]...]
### The file-name-pattern can contain wildcards (such as '*' and
### '?').  All entries which match will be applied to the file.
### Note that auto-props functionality must be enabled, which
### is typically done by setting the 'enable-auto-props' option.
*.dsp = svn:eol-style=CRLF
*.dsw = svn:eol-style=CRLF
*.sh = svn:eol-style=native;svn:executable
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.pdf = svn:mime-type=application/pdf
*.ps = svn:mime-type=application/postscript
*.rtf = svn:mime-type=application/rtf;svn:eol-style=native
*.rss = svn:mime-type=application/rss+xml
*.xsl = svn:mime-type=application/xsl+xml
*.xslt = svn:mime-type=application/xslt+xml
*.ico = svn:mime-type=image/x-icon
*.svg = svn:mime-type=image/svg+xml
*.vrml = svn:mime-type=model/vrml
*.wrl = svn:mime-type==model.vrml
*.css = svn:mime-type=text/css;svn:eol-style=native
*.html = svn:mime-type=text/html
*.txt = svn:mime-type=text/plain;svn:eol-style=native
*.TXT = svn:mime-type=text/plain;svn:eol-style=native
README = svn:mime-type=text/plain;svn:eol-style=native
INSTALL = svn:mime-type=text/plain;svn:eol-style=native
*.xml= = svn:mime-type=text/xml
*.c = svn:mime-type=text/x-csrc;svn:eol-style=native
*.xs = svn:mime-type=text/x-csrc;svn:eol-style=native
*.h = svn:mime-type=text/x-chdr;svn:eol-style=native
*.cpp = svn:mime-type=text/x-c++src;svn:eol-style=native
*.cc = svn:mime-type=text/x-c++src;svn:eol-style=native
*.CC = svn:mime-type=text/x-c++src;svn:eol-style=native
*.hpp = svn:mime-type=text/x-c++hdr;svn:eol-style=native
*.hh = svn:mime-type=text/x-c++hdr;svn:eol-style=native
*.HH = svn:mime-type=text/x-c++hdr;svn:eol-style=native
*.H = svn:mime-type=text/x-c++hdr;svn:eol-style=native
*.cs = svn:mime-type=text/x-csharp;svn:eol-style=native
*.diff = svn:mime-type=text/x-diff;svn:eol-style=native
*.patch = svn:mime-type=text/x-diff;svn:eol-style=native
*.ini = svn:mime-type=text/x-ini;svn:eol-style=native
*.cfg = svn:mime-type=text/x-ini;svn:eol-style=native
*.js = svn:mime-type=text/x-javascript;svn:eol-style=native
make = svn:mime-type=text/x-makefile;svn:eol-style=native
mk = svn:mime-type=text/x-makefile;svn:eol-style=native
Makefile = svn:mime-type=text/x-makefile;svn:eol-style=native
makefile = svn:mime-type=text/x-makefile;svn:eol-style=native
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to