Merge branch 'main' into main

This commit is contained in:
BeatLink
2026-02-27 18:09:22 -05:00
committed by GitHub
78 changed files with 2273 additions and 1487 deletions

View File

@@ -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()));

View File

@@ -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);
});

View File

@@ -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");
});
});
});

View File

@@ -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();
}
}
}