mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-12-21 05:31:28 +00:00
Fixed:
- Some extensions are encoded incorrectly.
This commit is contained in:
13
src/utils.ts
13
src/utils.ts
@@ -234,3 +234,16 @@ export function runWithLock<T>(key: unknown, ignoreWhenRunning: boolean, proc: (
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function isPlainText(filename: string): boolean {
|
||||
if (filename.endsWith(".md")) return true;
|
||||
if (filename.endsWith(".txt")) return true;
|
||||
if (filename.endsWith(".svg")) return true;
|
||||
if (filename.endsWith(".html")) return true;
|
||||
if (filename.endsWith(".csv")) return true;
|
||||
if (filename.endsWith(".css")) return true;
|
||||
if (filename.endsWith(".js")) return true;
|
||||
if (filename.endsWith(".xml")) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user