diff --git a/CHANGELOG.md b/CHANGELOG.md index 801cb672..b3f47610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +## [1.6.1] +### Changed +- Fix magic commands @vault_path and @vault_url + + ## [1.6.0] ### Added - New magic command `@theme` to get if obsidian is in dark or light mode (Thanks to @chlohal) diff --git a/manifest.json b/manifest.json index b4a69b1e..03142637 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "execute-code", "name": "Execute Code", - "version": "1.6.0", + "version": "1.6.1", "minAppVersion": "0.12.0", "description": "Allows to execute code snippets within a note. Supported programming languages: C, CPP, Dart, Golang, Groovy, Kotlin, Java, JavaScript, TypeScript, Lean, Lua, CSharp, Prolog, Rust, Python, R, Ruby, Wolfram Mathematica, Haskell, Scala, Racket, F#, Batch, Shell & Powershell.", "author": "twibiral", diff --git a/package-lock.json b/package-lock.json index 340fcb98..fc78781e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "execute-code", - "version": "1.6.0", + "version": "1.6.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 24f5dfb7..2857bcc6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "execute-code", - "version": "1.6.0", + "version": "1.6.1", "description": "This is a sample plugin for Obsidian (https://obsidian.md)", "main": "src/main.js", "scripts": { @@ -23,7 +23,7 @@ }, "dependencies": { "g": "^2.0.1", - "json5": "^2.2.1", + "json5": "^2.2.2", "moment": ">=2.29.4", "original-fs": "^1.2.0", "tau-prolog": "^0.3.4" diff --git a/src/transforms/Magic.ts b/src/transforms/Magic.ts index e3352646..8c724f10 100644 --- a/src/transforms/Magic.ts +++ b/src/transforms/Magic.ts @@ -38,9 +38,9 @@ const R_PLOT_REGEX = /^plot\(.*\)/gm; * @returns The transformed source code. */ export function insertVaultPath(source: string, vaultPath: string): string { - source = source.replace(VAULT_REGEX, `"app://local/${vaultPath.replace(/\\/g, "/")}"`); - source = source.replace(VAULT_URL_REGEX, `"app://local/${vaultPath.replace(/\\/g, "/")}"`); source = source.replace(VAULT_PATH_REGEX, `"${vaultPath.replace(/\\/g, "/")}"`); + source = source.replace(VAULT_URL_REGEX, `"app://local/${vaultPath.replace(/\\/g, "/")}"`); + source = source.replace(VAULT_REGEX, `"app://local/${vaultPath.replace(/\\/g, "/")}"`); return source; } @@ -54,9 +54,9 @@ export function insertVaultPath(source: string, vaultPath: string): string { * @returns The transformed source code. */ export function insertNotePath(source: string, notePath: string): string { - source = source.replace(CURRENT_NOTE_REGEX, `"app://local/${notePath.replace(/\\/g, "/")}"`); - source = source.replace(CURRENT_NOTE_URL_REGEX, `"app://local/${notePath.replace(/\\/g, "/")}"`); source = source.replace(CURRENT_NOTE_PATH_REGEX, `"${notePath.replace(/\\/g, "/")}"`); + source = source.replace(CURRENT_NOTE_URL_REGEX, `"app://local/${notePath.replace(/\\/g, "/")}"`); + source = source.replace(CURRENT_NOTE_REGEX, `"app://local/${notePath.replace(/\\/g, "/")}"`); return source; } diff --git a/versions.json b/versions.json index d66bb797..28683834 100644 --- a/versions.json +++ b/versions.json @@ -35,5 +35,6 @@ "1.3.0": "0.12.0", "1.4.0": "0.12.0", "1.5.0": "0.12.0", - "1.6.0": "0.12.0" + "1.6.0": "0.12.0", + "1.6.1": "0.12.0" } \ No newline at end of file