Skip to content

Commit

Permalink
Version 1.6.1
Browse files Browse the repository at this point in the history
Version 1.6.1
  • Loading branch information
twibiral authored Dec 28, 2022
2 parents 7cfbfe9 + 24d7c10 commit 1463b9a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions src/transforms/Magic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 1463b9a

Please sign in to comment.