feat(excalidraw): support .excalidraw.md (Obsidian plugin format) with lz-string decompression
CI / lint (push) Failing after 14s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 13s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
CI / lint (push) Failing after 14s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 13s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
This commit is contained in:
@@ -80,6 +80,7 @@ const EXT_ICONS = {
|
||||
".csv": "table",
|
||||
".tsv": "table",
|
||||
".excalidraw": "pen-tool",
|
||||
".excalidraw.md": "pen-tool",
|
||||
".sql": "database",
|
||||
".db": "database",
|
||||
".sqlite": "database",
|
||||
@@ -206,6 +207,10 @@ const EXT_ICONS = {
|
||||
};
|
||||
|
||||
function getFileIcon(name) {
|
||||
const lower = name.toLowerCase();
|
||||
// Check for double extensions first (e.g., .excalidraw.md)
|
||||
if (lower.endsWith(".excalidraw.md")) return EXT_ICONS[".excalidraw.md"] || "pen-tool";
|
||||
if (lower.endsWith(".md.excalidraw")) return EXT_ICONS[".excalidraw"] || "pen-tool";
|
||||
const ext = "." + name.split(".").pop().toLowerCase();
|
||||
return EXT_ICONS[ext] || "file";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user