mirror of
https://github.com/zadam/trilium.git
synced 2026-07-26 15:01:19 +02:00
Merge branch 'main' into main
This commit is contained in:
@@ -88,7 +88,7 @@ export default async function buildApp() {
|
||||
|
||||
const sessionParser = (await import("./routes/session_parser.js")).default;
|
||||
app.use(sessionParser);
|
||||
app.use(favicon(path.join(assetsDir, "icon.ico")));
|
||||
app.use(favicon(path.join(assetsDir, isDev ? "icon-dev.ico" : "icon.ico")));
|
||||
|
||||
if (openID.isOpenIDEnabled())
|
||||
app.use(auth(openID.generateOAuthConfig()));
|
||||
|
||||
@@ -179,10 +179,10 @@ describe("Markdown export", () => {
|
||||
> [!IMPORTANT]
|
||||
> This is a very important information.
|
||||
>${space}
|
||||
> | | |
|
||||
> | | |
|
||||
> | --- | --- |
|
||||
> | 1 | 2 |
|
||||
> | 3 | 4 |
|
||||
> | 1 | 2 |
|
||||
> | 3 | 4 |
|
||||
|
||||
> [!CAUTION]
|
||||
> This is a caution.
|
||||
@@ -374,10 +374,10 @@ describe("Markdown export", () => {
|
||||
</figure>
|
||||
`;
|
||||
const expected = trimIndentation`\
|
||||
| | |
|
||||
| | |
|
||||
| --- | --- |
|
||||
| Hi | there |
|
||||
| Hi | there |`;
|
||||
| Hi | there |
|
||||
| Hi | there |`;
|
||||
expect(markdownExportService.toMarkdown(html)).toBe(expected);
|
||||
});
|
||||
|
||||
|
||||
@@ -192,5 +192,16 @@ describe("Hidden Subtree", () => {
|
||||
llmNote = becca.getNote(noteId);
|
||||
expect(llmNote).toBeFalsy();
|
||||
});
|
||||
|
||||
it("fixes attribute of wrong type", () => {
|
||||
const template = becca.getNoteOrThrow("_template_table");
|
||||
cls.init(() => {
|
||||
template.setAttribute("relation", "template", "root");
|
||||
hiddenSubtreeService.checkHiddenSubtree();
|
||||
});
|
||||
const attr = template.getAttributes().find(a => a.name === "template");
|
||||
expect(attr).toBeDefined();
|
||||
expect(attr?.type).toBe("label");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -467,8 +467,10 @@ function checkHiddenSubtreeRecursively(parentNoteId: string, item: HiddenSubtree
|
||||
}
|
||||
|
||||
// Ensure value is consistent.
|
||||
if (attribute.value !== attrDef.value) {
|
||||
note.setAttributeValueById(attribute.attributeId, attrDef.value);
|
||||
if (attribute.value !== attrDef.value || attribute.type !== attrDef.type) {
|
||||
attribute.type = attrDef.type;
|
||||
attribute.value = attrDef.value ?? "";
|
||||
attribute.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user