()
| 45 | }; |
| 46 | |
| 47 | export const isCSS = () => { |
| 48 | const isSavedFile = ORIGINAL_FILE_PATH !== '?'; |
| 49 | const useEditorFileSyntaxForDeterminingFileType = EDITOR_FILE_SYNTAX !== '?'; |
| 50 | |
| 51 | const isAllowedExtension = hasAllowedFileExtension('css', ORIGINAL_FILE_PATH); |
| 52 | const isAllowedSyntax = hasAllowedFileSyntax('css', EDITOR_FILE_SYNTAX); |
| 53 | const isDisallowedFilePattern = hasDisallowedFilePathPattern('css', ORIGINAL_FILE_PATH); |
| 54 | |
| 55 | if (!isSavedFile) { |
| 56 | return useEditorFileSyntaxForDeterminingFileType |
| 57 | ? isAllowedSyntax |
| 58 | : false; |
| 59 | } |
| 60 | |
| 61 | if (isDisallowedFilePattern) { |
| 62 | return false; |
| 63 | } |
| 64 | |
| 65 | return useEditorFileSyntaxForDeterminingFileType |
| 66 | ? isAllowedSyntax || isAllowedExtension |
| 67 | : isAllowedExtension; |
| 68 | }; |
| 69 | |
| 70 | export const isHTML = (bufferContents) => { |
| 71 | const isSavedFile = ORIGINAL_FILE_PATH !== '?'; |
nothing calls this directly
no test coverage detected