Sun, 16 Mar 2025 12:24:41 +0100
Added "application/yaml" to the default list of text mimetypes and extended the check for a file being text for existing but unknown mimetype.
src/eric7/Preferences/__init__.py | file | annotate | diff | comparison | revisions | |
src/eric7/Utilities/MimeTypes.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/Preferences/__init__.py Sun Mar 16 12:15:35 2025 +0100 +++ b/src/eric7/Preferences/__init__.py Sun Mar 16 12:24:41 2025 +0100 @@ -346,6 +346,7 @@ "application/xquery", "application/xsl+xml", "application/xslt+xml", + "application/yaml", "image/svg+xml", "message/rfc822", ],
--- a/src/eric7/Utilities/MimeTypes.py Sun Mar 16 12:15:35 2025 +0100 +++ b/src/eric7/Utilities/MimeTypes.py Sun Mar 16 12:24:41 2025 +0100 @@ -52,6 +52,10 @@ return ( mimetype.split("/")[0] == "text" or mimetype in Preferences.getUI("TextMimeTypes") + or any( + fnmatch.fnmatch(filename, pat) + for pat in Preferences.getUI("TextFilePatterns") + ) or ( Preferences.getUI("TextMimeTypesAskUser") and EricMessageBox.yesNo(