chore(server): address requested changes

This commit is contained in:
Elian Doran 2025-10-28 15:44:00 +02:00
parent 17319d25e8
commit dd5b3a3c1c
No known key found for this signature in database
3 changed files with 1 additions and 10 deletions

View File

@ -151,7 +151,7 @@ function register(router: Router) {
const format = req.query.format || "html";
if (typeof format !== "string" || !["html", "markdown", "share"].includes(format)) {
throw new eu.EtapiError(400, "UNRECOGNIZED_EXPORT_FORMAT", `Unrecognized export format '${format}', supported values are 'html' (default) or 'markdown'.`);
throw new eu.EtapiError(400, "UNRECOGNIZED_EXPORT_FORMAT", `Unrecognized export format '${format}', supported values are 'html' (default), 'markdown' or 'share'.`);
}
const taskContext = new TaskContext("no-progress-reporting", "export", null);

View File

@ -100,13 +100,6 @@ export default class ShareThemeExportProvider extends ZipExportProvider {
}
function getShareThemeAssets(nameWithExtension: string) {
// Rename share.css to style.css.
if (nameWithExtension === "style.css") {
nameWithExtension = "share.css";
} else if (nameWithExtension === "script.js") {
nameWithExtension = "share.js";
}
let path: string | undefined;
if (nameWithExtension === "icon-color.svg") {
path = join(RESOURCE_DIR, "images", nameWithExtension);

View File

@ -7,8 +7,6 @@ if (isExternalLink) {
linkHref = note.getLabelValue("shareExternal");
} else if (note.shareId) {
linkHref = `./${note.shareId}`;
} else {
linkHref = `#${note.getBestNotePath().join("/")}`;
}
const target = isExternalLink ? ` target="_blank" rel="noopener noreferrer"` : "";