diff --git a/manifest.json b/manifest.json index 2944725..15bf4e6 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "quickadd", "name": "QuickAdd", - "version": "0.2.15", + "version": "0.2.16", "minAppVersion": "0.12.00", "description": "Quickly add new pages or content to your vault.", "author": "Christian B. B. Houmann", diff --git a/package.json b/package.json index 600e3e1..cd3719e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "quickadd", - "version": "0.2.15", + "version": "0.2.16", "description": "Quickly add new pages or content to your vault.", "main": "main.js", "scripts": { diff --git a/src/engine/TemplateChoiceEngine.ts b/src/engine/TemplateChoiceEngine.ts index 58c7e65..7dacea2 100644 --- a/src/engine/TemplateChoiceEngine.ts +++ b/src/engine/TemplateChoiceEngine.ts @@ -1,7 +1,7 @@ import type ITemplateChoice from "../types/choices/ITemplateChoice"; import type {App, TFile} from "obsidian"; import {appendToCurrentLine, getAllFolders} from "../utility"; -import {MARKDOWN_FILE_EXTENSION_REGEX, VALUE_SYNTAX} from "../constants"; +import {VALUE_SYNTAX} from "../constants"; import {log} from "../logger/logManager"; import type QuickAdd from "../main"; import {TemplateEngine} from "./TemplateEngine"; @@ -47,8 +47,7 @@ export class TemplateChoiceEngine extends TemplateEngine { } if (this.choice.appendLink) { - const linkString = `[[${createdFile.path.replace(MARKDOWN_FILE_EXTENSION_REGEX, '')}]]`; - appendToCurrentLine(linkString, this.app); + appendToCurrentLine(this.app.fileManager.generateMarkdownLink(createdFile, ''), this.app); } if (this.choice.openFile) { diff --git a/versions.json b/versions.json index c69dc1f..0c50ccc 100644 --- a/versions.json +++ b/versions.json @@ -1,3 +1,3 @@ { - "0.2.15": "0.12.4" + "0.2.16": "0.12.4" }