Skip to content

Build your personal knowledge base with Trilium Notes

chore(icon_pack): map woff attachment

Elian Dorand121de5152cc
diff --git a/apps/server/src/services/icon_packs.spec.ts b/apps/server/src/services/icon_packs.spec.ts
index 3e2bd86883..c4d0ad6ea5 100644
--- a/apps/server/src/services/icon_packs.spec.ts
+++ b/apps/server/src/services/icon_packs.spec.ts
@@ -45,4 +45,19 @@ describe("Mapping attachments", () => {
const attachment = determineBestFontAttachment(iconPackNote);
expect(attachment?.mime).toStrictEqual("font/woff2");
});
+
+ it("handles woff", () => {
+ const iconPackNote = buildNote({
+ type: "text",
+ attachments: [
+ {
+ role: "file",
+ title: "Font",
+ mime: "font/woff"
+ }
+ ]
+ });
+ const attachment = determineBestFontAttachment(iconPackNote);
+ expect(attachment?.mime).toStrictEqual("font/woff");
+ });
});
diff --git a/apps/server/src/services/icon_packs.ts b/apps/server/src/services/icon_packs.ts
index c313c0259d..dd448ed7a0 100644
--- a/apps/server/src/services/icon_packs.ts
+++ b/apps/server/src/services/icon_packs.ts
@@ -3,7 +3,8 @@ import type BNote from "../becca/entities/bnote";
import log from "./log";
const PREFERRED_MIME_TYPE = [
- "font/woff2"
+ "font/woff2",
+ "font/woff"
];
export interface IconPackManifest {