generated from polyipseity/obsidian-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add relative path support for Templater
Signed-off-by: William So <polyipseity@gmail.com>
- Loading branch information
1 parent
70e94a6
commit fbcf7d2
Showing
7 changed files
with
116 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"obsidian-modules": minor | ||
--- | ||
|
||
Add relative path support for Templater. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module "templater-obsidian" { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
declare module "templater-obsidian" { | ||
// https://silentvoid13.github.io/Templater/internal-functions/internal-modules/file-module.html | ||
interface FileModule { | ||
readonly folder: (relative?: boolean) => string | ||
} | ||
// https://silentvoid13.github.io/Templater/internal-functions/overview.html | ||
interface FunctionsObject extends Record<string, unknown> { | ||
readonly file: FileModule | ||
} | ||
// https://github.com/SilentVoid13/Templater/blob/487805b5ad1fd7fbc145040ed82b4c41fc2c48e2/src/core/parser/Parser.ts#L7 | ||
interface Parser { | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
readonly parse_commands: ( | ||
content: string, | ||
context: FunctionsObject, | ||
) => PromiseLike<string> | ||
} | ||
// https://github.com/SilentVoid13/Templater/blob/487805b5ad1fd7fbc145040ed82b4c41fc2c48e2/src/core/Templater.ts#L39 | ||
interface Templater { | ||
readonly parser: Parser | ||
} | ||
// https://github.com/SilentVoid13/Templater/blob/487805b5ad1fd7fbc145040ed82b4c41fc2c48e2/src/main.ts#L15 | ||
interface TemplaterPlugin extends Plugin { | ||
readonly templater: Templater | ||
} | ||
} | ||
import type { } from "templater-obsidian" | ||
import type { Plugin } from "obsidian" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters