# HG changeset patch # User Claus Gittinger # Date 1526036987 -7200 # Node ID d9336080778d3d487c207ed7c00748df8904d7fb # Parent de7c2d6148e1a46cf1a8f8b64db1c36649cc0051 #DOCUMENTATION by cg class: MIMETypes class changed: #commentStringsForFilename: diff -r de7c2d6148e1 -r d9336080778d MIMETypes.st --- 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'.