[MonoDevelop] About MIME types

Michael Hutchinson m.j.hutchinson at gmail.com
Mon Oct 11 17:31:51 EDT 2010


On Fri, Sep 17, 2010 at 4:27 AM, Federico Di Gregorio <fog at initd.org> wrote:
> I have a little question about how MD editor uses MIME types. Lately
> I've noted that my CSS files are not highlighted and I started to write
> a syntax file only to discover that a syntax files already exists. The
> only problem is that it specifies "text/x-css" as MIME type. I don't
> know from where text/x-css comes but just appending ";text/css" (i.e.,
> the correct MIME type) made the editor correctly highlight CSS files.
>
> So, here are the questions:
>
> 1) From where does text/x-css comes?

Probably Gnome's VFS or GIO APIs.

> 2) It is file to send a patch that adds the correct MIME type to make
>   sure the editor highlighting always work?

AFAICT text/css is correct, text/x-css is wrong. Instead of adding
text/x-css to the list of mimetypes supported by the syntax
definition, the correct fix would be to register text/css in MD as the
mimetype for the .css extension, which should prevent MD from querying
GNOME APIs (and also make it work on Mac and Windows).

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list