Add groovy language to KNOWN_MIME_TYPES
|Reported by:||Owned by:|
Added groovy as supported mime type for Pygments highlighting
I upgraded my Pygments to get syntax highlighting for our Groovy language (dynamic language for Java Virtual Machine), but was surprised that support did not work unless MIME type was "text/x-groovy".
I figured that Trac would have some way to scan the supported Lexers of Pygments. But my only reason for thinking that is because the page http://pygments.org/docs/lexers/ appears to be auto-generated.
Patch against latest branches/0.12-stable:
367 367 # extend the above with simple (text/x-<something>: <something>) mappings 368 368 369 369 TEXT_X_TYPES = """ 370 ada asm asp awk idl inf java ksh lua m4 mail psp rfc rst sql tcl tex zsh 370 ada asm asp awk idl inf java ksh lua m4 mail psp rfc rst sql tcl tex zsh 371 371 """ 372 372 for x in TEXT_X_TYPES.split(): 373 373 KNOWN_MIME_TYPES.setdefault('text/x-%s' % x, ).append(x)