mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
feat(import): trim .mdx extension from import
This commit is contained in:
parent
f9e4ae7210
commit
324a3d0d8b
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user