feat(export/share): prefer #shareAlias

This commit is contained in:
Elian Doran 2025-10-28 17:57:48 +02:00
parent 54200fa0cb
commit be98a27439
No known key found for this signature in database

View File

@ -117,6 +117,9 @@ async function exportToZip(taskContext: TaskContext<"export">, branch: BBranch,
const title = note.getTitleOrProtected();
const completeTitle = branch.prefix ? `${branch.prefix} - ${title}` : title;
let baseFileName = sanitize(completeTitle);
if (format === "share") {
baseFileName = sanitize(note.getOwnedLabelValue("shareAlias") || baseFileName);
}
if (baseFileName.length > 200) {
// the actual limit is 256 bytes(!) but let's be conservative