Christian Boos <
christi...@free.fr> writes:
> Note that mimetypes.guess_type() is also called as part of
> Mimeview.get_mimetype() [1] and that one is called when the
> Node.content_type returns None.
Thank you Christian, I really missed that part of the machinery. In
particular, I was tricked by the default value for the option
"mimeviewer.mime_map_patterns":
text/plain:README|INSTALL|COPYING.*
that obviously prevented "README.rst" to get considered as
reStructuredText. As soon as I prepended "text/x-rst:.*\.rst$" to that
setting, everything seems working the way I like :-)
One minor point is that the fallback is triggered when Node.content_type
returns either None or '', so apparently the VC backend cannot prevent
the heuristic to happen for example on a directory with an unusual
"INSTALLABLE.STUFF" name...
ciao, lele.