mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 22:05:44 +01:00
refactor(share): use a string cache for templates
This commit is contained in:
@@ -51,8 +51,10 @@ export default class ShareThemeExportProvider extends ZipExportProvider {
|
||||
|
||||
if (note) {
|
||||
content = renderNoteForExport(note, branch, basePath, noteMeta.notePath.slice(0, -1));
|
||||
content = content.replace(/href="[^"]*\.\/([a-zA-Z0-9_\/]{12})[^"]*"/g, "href=\"#root/$1\"");
|
||||
content = this.rewriteFn(content, noteMeta);
|
||||
if (typeof content === "string") {
|
||||
content = content.replace(/href="[^"]*\.\/([a-zA-Z0-9_\/]{12})[^"]*"/g, "href=\"#root/$1\"");
|
||||
content = this.rewriteFn(content, noteMeta);
|
||||
}
|
||||
}
|
||||
|
||||
return content;
|
||||
|
||||
Reference in New Issue
Block a user