typoscript lexer claims .txt extension

Issue #1470 new
Thomas Waldmann
created an issue

this is a bit unfortunate, because most *.txt files are likely not typoscript, but just text/plain.

i noticed this because we (in moin2 wiki) use the types / extensions from pygments to augment the stdlib mimetypes, so we can process all mimetypes in the same way and choose a pygments highlighter based on the mimetype.

on cpython, this worked ok somehow, while i just noticed test failures on pypy, where "readme.txt" gets determined as 'text/x-typoscript' by our code (not 'text/plain' as in cpython).

the different behaviour is likely due to different dict items ordering, so it worked ok on cpython just by accident.

but the main problem is that typoscript in pygment claims the ".txt" extension additionally to the more specific ".ts".

can we just remove all claims for ".txt" that are not "text/plain", please?

Comments (0)

  1. Log in to comment