Html code

This commit is contained in:
Siddharth Ganesan
2026-04-10 10:59:47 -07:00
parent e2b4eb370d
commit 386d0aa6fc

View File

@@ -204,7 +204,13 @@ interface FileViewerProps {
function isCodeFile(file: { type: string; name: string }): boolean {
const ext = getFileExtension(file.name)
return SUPPORTED_CODE_EXTENSIONS.includes(ext as (typeof SUPPORTED_CODE_EXTENSIONS)[number])
return (
SUPPORTED_CODE_EXTENSIONS.includes(ext as (typeof SUPPORTED_CODE_EXTENSIONS)[number]) ||
ext === 'html' ||
ext === 'htm' ||
ext === 'xml' ||
ext === 'svg'
)
}
function resolveCodeEditorLanguage(file: { type: string; name: string }): CodeEditorLanguage {