Describe the bug
I've got a capture set to put text into my daily note, directly under the heading with today's date.
The file is created with a template which creates the title line to be today's date using the templater plugin.
The quickadd capture is set to create the file if it doesn't exist.
This breaks and quickadd cannot find the line when the file is created, but it can find the line if the capture is run again.
To Reproduce
Steps to reproduce the behavior:
- Make a template with just
# <% tp.file.name %> in your template folder.
- Create a quickadd capture with the following settings
- File name:
days/{{DATE:YYYY-MM-DD}}.md
- Create if file doesn't exist: true
- Create file with template: the new template as above
- Insert after:
# {{DATE:YYYY-MM-DD}}
- Format:
{{VALUE}}
- Delete the expected file if it already exists.
- Run the new quickadd, enter some text in the dialogue box.
-> Error: QuickAdd: (ERROR) unable to find insert after line in file.
-> The file is created with the expected name and the heading we wanted.
- Run the quickadd again, enter some text in the dialogue.
-> No error, and the text is inserted under the heading where we expected it.
Expected behavior
I expected that step 4 would give me the same outcome as step 5.
Screenshots
I could grab some screenshots of the settings if that would help. Let me know what would be useful to see.
Desktop (please complete the following information):
- OS: MacOS
- Browser: Ehh, obsidian is a standalone app so why is my browser relevant? I've got safari, brave, chrome, and firefox installed. Using firefox as the default browser.
- Obsidian version: 0.12.15
- Quickadd version: 0.4.17
- Templater version: 1.9.9
Additional context
- I checked the file while the dialogue box is up and the contents of the file are filled with the "evaluated" template while the dialogue box is open.
- I tried all combinations of the options for choosing a template to use to create the file in quickadd, and to apply the template on file creation from templater. This doesn't seem to make any difference for what I'm trying to do, but quickadd will overrule templater if the templates are set to something different.
- If the "target line" is in the template but not dynamically created, it seems to work as intended.
Describe the bug
I've got a capture set to put text into my daily note, directly under the heading with today's date.
The file is created with a template which creates the title line to be today's date using the templater plugin.
The quickadd capture is set to create the file if it doesn't exist.
This breaks and quickadd cannot find the line when the file is created, but it can find the line if the capture is run again.
To Reproduce
Steps to reproduce the behavior:
# <% tp.file.name %>in your template folder.days/{{DATE:YYYY-MM-DD}}.md# {{DATE:YYYY-MM-DD}}{{VALUE}}-> Error:
QuickAdd: (ERROR) unable to find insert after line in file.-> The file is created with the expected name and the heading we wanted.
-> No error, and the text is inserted under the heading where we expected it.
Expected behavior
I expected that step 4 would give me the same outcome as step 5.
Screenshots
I could grab some screenshots of the settings if that would help. Let me know what would be useful to see.
Desktop (please complete the following information):
Additional context