generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(templates): offer retry on templater errors
- Loading branch information
1 parent
e42809a
commit 64dae86
Showing
3 changed files
with
95 additions
and
38 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
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,29 @@ | ||
import { FormDefinition } from "../formDefinition"; | ||
|
||
export const retryForm: FormDefinition = { | ||
title: "Templater error", | ||
name: "retry-temlate", | ||
version: "1", | ||
fields: [ | ||
{ | ||
name: "title", | ||
label: "", | ||
description: "", | ||
input: { | ||
type: "markdown_block", | ||
body: "return `\n==Templater reported an error==\nWe are not sure about what it is, but is very likely a parse error.\nPlease try to fix the templater code below and submit it to retry\n`", | ||
}, | ||
isRequired: false, | ||
}, | ||
{ | ||
name: "template", | ||
label: "Code", | ||
description: "Fix the template below and try to submit again", | ||
input: { | ||
type: "textarea", | ||
hidden: false, | ||
}, | ||
isRequired: false, | ||
}, | ||
], | ||
}; |
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