I have to insert template twice for it to fully insert

Steps to reproduce

  1. Create a template folder
  2. Assign the template folder in settings
  3. Create a template with the following text (need to be in source mode)
---
Date: {{date:YYYY-MM-DD}}
---
---

^ [[Active Repairs]]

- [ ] ==(is this still active?) ==

---
  1. Create a new file and try to insert the template.
  2. Realize not everything inserted and insert again.
  3. It kind of works if you insert twice but the spacing is wrong.

Did you follow the troubleshooting guide? [Y/N]

Yes

Expected result

It should insert the whole template on the first try

Actual result

It is not inserting the template fully on the first insert, and when you insert it a second time the spacing is wrong.

Environment

SYSTEM INFO:
Obsidian version: v1.7.7
Installer version: v1.6.5
Operating system: Windows 11 Enterprise 10.0.22631
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

This is the result of inserting twice, notice the spacing is wrong.

This is the template

Thanks,
Boaz

Hello

Intriguing. All of the versions below work. Doesn’t seem to like consecutive lines of triple hyphens. No idea why. A conflict with setext headings?

---
Date: {{date:YYYY-MM-DD}}
---
- - -

^ [[Active Repairs]]

- [ ] ==(is this still active?) ==

---
---
Date: {{date:YYYY-MM-DD}}
---

---

^ [[Active Repairs]]

- [ ] ==(is this still active?) ==

---
---
Date: {{date:YYYY-MM-DD}}
---
***

^ [[Active Repairs]]

- [ ] ==(is this still active?) ==

***

Hampton,

Thank you for this solution!

Weird that the bug exists but this definitely solves it for my use case!

Thanks,
Boaz

1 Like

It would help to show an example of what happens when you only insert once.

In the hope this helps—only the YAML header is inserted (the dash below is just the cursor flashing way):

insert once

Thanks, I’ve identified the issue. Will be fixed in a future update