feat(import): trim .mdx extension from import

This commit is contained in:
Elian Doran 2025-02-20 20:29:00 +02:00
parent f9e4ae7210
commit 324a3d0d8b
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,7 @@ describe("processNoteContent", () => {
try { try {
expect(importedNote.mime).toBe("text/mdx"); expect(importedNote.mime).toBe("text/mdx");
expect(importedNote.type).toBe("text"); expect(importedNote.type).toBe("text");
expect(importedNote.title).toBe("Text Note");
} catch (e) { } catch (e) {
reject(e); reject(e);
} }

View File

@ -173,6 +173,7 @@ export function removeTextFileExtension(filePath: string) {
switch (extension) { switch (extension) {
case ".md": case ".md":
case ".mdx":
case ".markdown": case ".markdown":
case ".html": case ".html":
case ".htm": case ".htm":