--- a/MIMETypes.st Thu May 10 21:06:20 2018 +0200
+++ b/MIMETypes.st Fri May 11 13:09:47 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1997 by eXept Software AG
All Rights Reserved
@@ -1451,16 +1453,17 @@
!MIMETypes class methodsFor:'queries-language syntax'!
-commentStringsForFilename:aFilename
+commentStringsForFilename:aFilenameOrString
"return a useful comment definition; heuristics for now.
The returned value is an array of 2 elements;
the first is the end-of-line comment string (or nil);
the second an array of opening/closing delimiters (or an array of nils)"
- |mime|
+ |filename mime|
- mime := MIMETypes mimeTypeForFilename:aFilename.
- ^ self commentStringsForMimeType:mime suffix:(aFilename asFilename suffix)
+ filename := aFilenameOrString asFilename.
+ mime := MIMETypes mimeTypeForFilename:filename.
+ ^ self commentStringsForMimeType:mime suffix:(filename suffix)
"
MIMETypes commentStringsForFilename:'Makefile'.