Since I have upgraded to Kate 17.08.0 (from 17.04.3) all my normal text files are highlighted as powershell script by default (autodetection). The files have a ".txt" extension and not a powershell specific one. This is always reproducible.
seems to be part of frameworks -> thus, this was introduced with the update to 5.37
some more observations: settings -> Open/Save -> Modes & Filetypes - I can see correctly specified file extensions "*.ps1;*.ps1m;*.ps1d". - I have noticed that the other entries contain extra mime-types for the specific type (e.g. "application/x-python;text/x-python" for python) type or no mime type (i.e., the empty string). PowerShell does contain the mimetype "text/plain" instead. -> replacing the mime type "text/plain" with the empty string "" fixes the problem. The mimetype and extension is somewhat ambiguous (as the mime type can declare their own filename pattern (and thus extension)). https://docs.kde.org/stable5/en/applications/katepart/highlight.html does not clearly state how this two properties behave in combination. I guess this is implemented as an AND and the author of the PowerShell file interpreted it as an OR. => Thus, the relation of this attributes should be clearly specified in https://docs.kde.org/stable5/en/applications/katepart/highlight.html and the mime-type should be set to empty in PowerShell.xml
/s/I guess this is implemented as an AND and the author of the PowerShell file interpreted it as an OR./I guess this is implemented as an OR and the author of the PowerShell file interpreted it as an AND./
created a path: https://phabricator.kde.org/D7464
fixed in master: https://phabricator.kde.org/R216:26daf7ee5b4a4534d918ed7d9e66d64cb30b0c26
*** Bug 383860 has been marked as a duplicate of this bug. ***
*** Bug 384115 has been marked as a duplicate of this bug. ***
*** Bug 383691 has been marked as a duplicate of this bug. ***