A plugin for Obsidian (https://obsidian.md) that adds additional `x-callback-url` endpoints to the app for common actions — it's a clean, super-charged addition to Obsidian URI.
[ZCO-144] When `/daily-note/create` and `/daily-note/search-and-replace` are run in short succession, the latter sometimes doesn't see the content of the created note #61
When I create a new note and then try to replace text in that note, I need to add a short pause between those calls. Since the note in question is being initially auto-filled by Templater (i.e. I only create an empty note, then Templater takes over) I suspect a race condition: the second call (appending) is handled before Templater is done.
Confirmed. It's a race condition. Adding a check for Templater and conditionally waiting 0.5s after creation seems to do the trick!
When I create a new note and then try to replace text in that note, I need to add a short pause between those calls. Since the note in question is being initially auto-filled by Templater (i.e. I only create an empty note, then Templater takes over) I suspect a race condition: the second call (appending) is handled before Templater is done.
Confirmed. It's a race condition. Adding a check for Templater and conditionally waiting 0.5s after creation seems to do the trick!
ZCO-144