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

New line added to user template replacements #108

Closed
rummers opened this issue Apr 14, 2021 · 1 comment
Closed

New line added to user template replacements #108

rummers opened this issue Apr 14, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rummers
Copy link

rummers commented Apr 14, 2021

Plugin informations:

  • OS: Mac
  • Templater version: 1.5
  • Obsidian version: 0.11.13

Describe the bug
Recently (since updating to 1.0+??) user defined template replacements have a new-line automatically appended, breaking uses where the template is inserted in the middle of a line of other text, for example using the echo template from the help doc:

<% tp.user.echo() %> <% tp.user.echo() %>

Get's replaced as:

I love templater
 I love templater

Expected behavior
Previously user defined templates were consistent with internal templates, e.g.
<% tp.date.now() %> <% tp.date.now() %>

gets replaced as:

2021-04-14 2021-04-14

@rummers rummers added the bug Something isn't working label Apr 14, 2021
@SilentVoid13
Copy link
Owner

Hey @rummers, this has been discussed in #92, but actually I think you're right, I'll trim the newline at the end of a user command.
This is more natural and makes more sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants