Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: insert template at the end of a new note #1468

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

Dynge
Copy link
Contributor

@Dynge Dynge commented Jun 14, 2024

I noticed this small bug as I've begun using journal entries in my notes.

I believe the problem occurs because I've set metagen.type = "auto".

This fixes a bug where metadata is injected into the newly created file before the template contents. Which results in the template content being placed above the metadata.

By changing the 0 to a $ we always insert the template at the end of the file. I believe this is safe as this only occurs on newly created journal entries, which should therefore always be empty (except for some possible metadata injected by metagen).

This fixes a bug where metadata is injected into the newly created file
before the template contents. Which results in the template content
being placed above the metadata.
@vhyrro
Copy link
Member

vhyrro commented Jun 25, 2024

Looks good to me! Can't think of a place where this would break either.

@vhyrro vhyrro merged commit f33a491 into nvim-neorg:main Jun 25, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants