Summary: | KSyntaxHighlighting 5.37 detects normal text files as poweshell script | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-syntax-highlighting | Reporter: | Till Schäfer <till2.schaefer> |
Component: | syntax | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cfeck, notuxius, piotr.mierzwinski |
Priority: | NOR | ||
Version: | 5.37.0 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
URL: | https://phabricator.kde.org/D7464 | ||
Latest Commit: | https://commits.kde.org/syntax-highlighting/26daf7ee5b4a4534d918ed7d9e66d64cb30b0c26 | Version Fixed In: | 5.38 |
Description
Till Schäfer
2017-08-22 12:21:57 UTC
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 *** 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. *** |