I'm using Trac 1.5.4.dev (trunk).
I just noticed that when viewing files from the repository, a .c file will
show as an image, but a .h file will show properly.
This is the kind of HTML that shows up within the web page:
Interestingly, using the "c" processor will syntax
FWIW, if I set the mime type to "text/x-csrc" it will highlight.
Also, although the .h file is shown, I think it's not highlighted. I
suppose if I set the mime type it would regain its mind.
I'll have to look deeper, I guess.
- Dan
On Tuesday, May 17, 2022 at 3:42:31 PM UTC-5 Dan wrote:
>
Works for me, I guess. At least in this case.
Index: api.py
===
--- api.py(revision 17579)
+++ api.py(working copy)
@@ -930,7 +930,8 @@
for mimetype, kwds in renderer.get_extra_mimetypes()
or []:
It looks like this issue is due to pygments.lexers.get_all_lexers() having
multiple mime types associated with this extension.
('C', ('c',), ('*.c', '*.h', '*.idc', '*.x[bp]m'), ('text/x-chdr',
'text/x-csrc', 'image/x-xbitmap', 'image/x-xpixmap'))
So, in mimeview.py, Mimeview.mime_map(), there