You've already forked obsidian-visualiser
Content auto pulling, git pull link fix and cleaning console.log/console.time.
This commit is contained in:
@@ -14,8 +14,6 @@ export default defineEventHandler(async (e) => {
|
||||
setResponseStatus(e, 401);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(id);
|
||||
|
||||
setResponseStatus(e, 200);
|
||||
return {};
|
||||
|
||||
@@ -14,9 +14,6 @@ export default defineEventHandler(async (e) => {
|
||||
setResponseStatus(e, 401);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(id);
|
||||
console.log(await readBody(e));
|
||||
|
||||
setResponseStatus(e, 200);
|
||||
return;
|
||||
|
||||
@@ -91,7 +91,7 @@ export default defineTask({
|
||||
function reshapeLinks(content: string | null, all: ProjectContent[])
|
||||
{
|
||||
return content?.replace(/\[\[(.*?)?(#.*?)?(\|.*?)?\]\]/g, (str, link, header, title) => {
|
||||
return `[[${link ? parsePath(all.find(e => e.path.endsWith(parsePath(link)))?.path ?? parsePath(link)) : ''}${header ?? ''}${title ?? ''}]]`;
|
||||
return `[[${link ? parsePath(all.findLast(e => e.path.endsWith(parsePath(link)))?.path ?? parsePath(link)) : ''}${header ?? ''}${title ?? ''}]]`;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user