From 94127c41f090c12834f9e8303c9eb8a9e612ddd0 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Fri, 25 Nov 2022 13:47:10 +0100 Subject: [PATCH] Directive fix --- plugs/directive/command.ts | 2 +- website/template/tagged-tasks.md | 2 +- website/template/task.md | 2 +- website/🔌 Directive.md | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugs/directive/command.ts b/plugs/directive/command.ts index 13dee70b..301bd41b 100644 --- a/plugs/directive/command.ts +++ b/plugs/directive/command.ts @@ -41,13 +41,13 @@ export async function updateDirectivesOnPageCommand(arg: any) { async (fullMatch, startInst, _type, _arg, _body, endInst, index) => { const replacement: { fullMatch: string; text?: string } = { fullMatch }; // Pushing to the replacement array - replacements.push(replacement); const currentNode = nodeAtPos(tree, index + 1); if (currentNode?.type !== "CommentBlock") { // If not a comment block, it's likely a code block, ignore // console.log("Not comment block, ingoring", fullMatch); return fullMatch; } + replacements.push(replacement); try { const replacementText = await system.invokeFunction( "server", diff --git a/website/template/tagged-tasks.md b/website/template/tagged-tasks.md index b2d2cb79..e646dc1b 100644 --- a/website/template/tagged-tasks.md +++ b/website/template/tagged-tasks.md @@ -4,4 +4,4 @@ $disableDirectives: true - + \ No newline at end of file diff --git a/website/template/task.md b/website/template/task.md index e84a6b1c..75f49fc7 100644 --- a/website/template/task.md +++ b/website/template/task.md @@ -1 +1 @@ -* [{{#if done}}x{{else}} {{/if}}] [[{{page}}@{{pos}}]] {{name}} {{#if deadline}}📅 {{deadline}}{{/if}} {{#each tags}}{{.}} {{/each}} \ No newline at end of file +* [{{#if done}}x{{else}} {{/if}}] [[{{page}}@{{pos}}]] {{name}} {{#if deadline}}📅 {{deadline}}{{/if}} {{#each tags}}#{{.}} {{/each}} \ No newline at end of file diff --git a/website/🔌 Directive.md b/website/🔌 Directive.md index fde40807..b3706f80 100644 --- a/website/🔌 Directive.md +++ b/website/🔌 Directive.md @@ -39,13 +39,13 @@ Note that a string is also a valid JSON value: * [ ] #test This is a test task - + * [ ] [[🔌 Directive@1340]] This is a test task #test which renders as: - + * [ ] [[🔌 Directive@1537]] This is a test task #test @@ -73,4 +73,4 @@ Optionally, you can use a `render` clause to render the result as a template, si id: title-unfurl name: Extract title --- - + \ No newline at end of file