(content: string)
| 54 | return await work(); |
| 55 | } |
| 56 | async formatContentOnly(content: string) { |
| 57 | if (/\{\{clipboard\}\}/i.test(content)) { |
| 58 | createdClipboardAttachmentPaths.push("Clipboard image.png"); |
| 59 | return content.replace(/\{\{clipboard\}\}/gi, "![[Clipboard image.png]]"); |
| 60 | } |
| 61 | |
| 62 | if (!/\{\{value\}\}/i.test(content)) return content; |
| 63 | |
| 64 | const draftHandler = new InputPromptDraftHandler( |
| 65 | { |
| 66 | kind: "single", |
| 67 | header: "Capture Choice", |
| 68 | placeholder: "", |
| 69 | }, |
| 70 | () => true, |
| 71 | ); |
| 72 | const hydrated = draftHandler.hydrate(""); |
| 73 | promptHydratedValues.push(hydrated); |
| 74 | const submitted = promptResponses.shift() ?? hydrated; |
| 75 | draftHandler.markChanged(); |
| 76 | draftHandler.persist(submitted, true); |
| 77 | |
| 78 | return content.replace(/\{\{value\}\}/gi, submitted); |
| 79 | } |
| 80 | async formatContentWithFile(content: string) { |
| 81 | if (/\{\{clipboard\}\}/i.test(content)) { |
| 82 | createdClipboardAttachmentPaths.push("Clipboard image.png"); |
nothing calls this directly
no test coverage detected